diff options
author | Alexander Barkov <bar@mariadb.com> | 2018-05-21 13:26:16 +0400 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2018-05-21 16:34:11 +0000 |
commit | 1e69d3f19616d2ac52608db4422a018930b32b0d (patch) | |
tree | 9cadb4bb0459e6d723ca284f15ec98b1d4a25b50 /sql/sp_head.cc | |
parent | 7d91d98ac12a849eebc553989b706bb820b94d79 (diff) | |
download | mariadb-git-1e69d3f19616d2ac52608db4422a018930b32b0d.tar.gz |
Addressing Monty's review suggestions for MDEV-11952 Oracle-style packages (partial)
- Using array_elements() instead of a constant to iterate through an array
- Adding some comments
- Adding new-line function comments
- Using STRING_WITH_LEN instead of C_STRING_WITH_LEN
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r-- | sql/sp_head.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc index ac88f05a866..151023aa24c 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -369,6 +369,7 @@ Item *THD::sp_prepare_func_item(Item **it_addr, uint cols) /** Fix an Item for evaluation for SP. */ + Item *THD::sp_fix_func_item(Item **it_addr) { DBUG_ENTER("THD::sp_fix_func_item"); @@ -594,6 +595,7 @@ sp_package::~sp_package() /* Test if two routines have equal specifications */ + bool sp_head::eq_routine_spec(const sp_head *sp) const { // TODO: Add tests for equal return data types (in case of FUNCTION) @@ -1607,6 +1609,7 @@ bool sp_head::check_execute_access(THD *thd) const @retval NULL - error (access denided or EOM) @retval !NULL - success (the invoker has rights to all %TYPE tables) */ + sp_rcontext *sp_head::rcontext_create(THD *thd, Field *ret_value, Row_definition_list *defs, bool switch_security_ctx) @@ -1784,6 +1787,7 @@ err_with_cleanup: /* Execute the package initialization section. */ + bool sp_package::instantiate_if_needed(THD *thd) { List<Item> args; @@ -2459,6 +2463,7 @@ sp_head::merge_lex(THD *thd, LEX *oldlex, LEX *sublex) /** Put the instruction on the backpatch list, associated with the label. */ + int sp_head::push_backpatch(THD *thd, sp_instr *i, sp_label *lab, List<bp_t> *list, backpatch_instr_type itype) @@ -2514,6 +2519,7 @@ sp_head::push_backpatch_goto(THD *thd, sp_pcontext *ctx, sp_label *lab) Update all instruction with this label in the backpatch list to the current position. */ + void sp_head::backpatch(sp_label *lab) { @@ -3041,6 +3047,7 @@ bool sp_head::add_instr_preturn(THD *thd, sp_pcontext *spcont) QQ: Perhaps we need a dedicated sp_instr_nop for this purpose. */ + bool sp_head::replace_instr_to_nop(THD *thd, uint ip) { sp_instr *instr= get_instr(ip); @@ -3165,6 +3172,7 @@ sp_head::opt_mark() @return 0 if ok, !=0 on error. */ + int sp_head::show_routine_code(THD *thd) { @@ -4457,6 +4465,7 @@ sp_instr_agg_cfetch::print(String *str) - opens the cursor without copying data (materialization). - copies the cursor structure to the associated %ROWTYPE variable. */ + int sp_instr_cursor_copy_struct::exec_core(THD *thd, uint *nextp) { @@ -4933,6 +4942,7 @@ sp_head::set_local_variable(THD *thd, sp_pcontext *spcont, /** Similar to set_local_variable(), but for ROW variable fields. */ + bool sp_head::set_local_variable_row_field(THD *thd, sp_pcontext *spcont, const Sp_rcontext_handler *rh, @@ -5127,6 +5137,7 @@ bool sp_head::spvar_fill_table_rowtype_reference(THD *thd, END p1; Check that the first p1 and the last p1 match. */ + bool sp_head::check_package_routine_end_name(const LEX_CSTRING &end_name) const { LEX_CSTRING non_qualified_name= m_name; |