diff options
author | Alexander Barkov <bar@mariadb.org> | 2018-02-04 18:40:06 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2018-02-04 18:40:06 +0400 |
commit | 217fc122c8e893aa48fa5dcfb3dbfcc99a2aa299 (patch) | |
tree | 83093666c427b4770d82c0ff44f0d7034bec13a8 /sql/sp_rcontext.cc | |
parent | d6ed077fc82c2f4d20895db9a6b16ca295f23c33 (diff) | |
parent | 28d4cf0c1b3366c6471866d144ef28fced1e5390 (diff) | |
download | mariadb-git-217fc122c8e893aa48fa5dcfb3dbfcc99a2aa299.tar.gz |
Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3
Diffstat (limited to 'sql/sp_rcontext.cc')
-rw-r--r-- | sql/sp_rcontext.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sql/sp_rcontext.cc b/sql/sp_rcontext.cc index 825141d4a5b..eab0e10a3f0 100644 --- a/sql/sp_rcontext.cc +++ b/sql/sp_rcontext.cc @@ -316,7 +316,7 @@ bool sp_rcontext::init_var_items(THD *thd, uint num_vars= m_root_parsing_ctx->max_var_index(); m_var_items.reset( - static_cast<Item **> ( + static_cast<Item_field **> ( thd->alloc(num_vars * sizeof (Item *))), num_vars); @@ -633,7 +633,7 @@ int sp_rcontext::set_variable_row_field_by_name(THD *thd, uint var_idx, int sp_rcontext::set_variable_row(THD *thd, uint var_idx, List<Item> &items) { DBUG_ENTER("sp_rcontext::set_variable_row"); - DBUG_ASSERT(get_item(var_idx)->cols() == items.elements); + DBUG_ASSERT(get_variable(var_idx)->cols() == items.elements); Virtual_tmp_table *vtable= virtual_tmp_table_for_row(var_idx); Sp_eval_expr_state state(thd); DBUG_RETURN(vtable->sp_set_all_fields_from_item_list(thd, items)); @@ -642,8 +642,8 @@ int sp_rcontext::set_variable_row(THD *thd, uint var_idx, List<Item> &items) Virtual_tmp_table *sp_rcontext::virtual_tmp_table_for_row(uint var_idx) { - DBUG_ASSERT(get_item(var_idx)->type() == Item::FIELD_ITEM); - DBUG_ASSERT(get_item(var_idx)->cmp_type() == ROW_RESULT); + DBUG_ASSERT(get_variable(var_idx)->type() == Item::FIELD_ITEM); + DBUG_ASSERT(get_variable(var_idx)->cmp_type() == ROW_RESULT); Field *field= m_var_table->field[var_idx]; Virtual_tmp_table **ptable= field->virtual_tmp_table_addr(); DBUG_ASSERT(ptable); @@ -808,7 +808,7 @@ int sp_cursor::fetch(THD *thd, List<sp_variable> *vars, bool error_on_no_data) if (vars->elements != result.get_field_count() && (vars->elements != 1 || result.get_field_count() != - thd->spcont->get_item(vars->head()->offset)->cols())) + thd->spcont->get_variable(vars->head()->offset)->cols())) { my_message(ER_SP_WRONG_NO_OF_FETCH_ARGS, ER_THD(thd, ER_SP_WRONG_NO_OF_FETCH_ARGS), MYF(0)); @@ -906,7 +906,7 @@ int sp_cursor::Select_fetch_into_spvars::send_data(List<Item> &items) on attempt to assign a scalar value to a ROW variable. */ return spvar_list->elements == 1 && - (item= thd->spcont->get_item(spvar_list->head()->offset)) && + (item= thd->spcont->get_variable(spvar_list->head()->offset)) && item->type_handler() == &type_handler_row && item->cols() == items.elements ? thd->spcont->set_variable_row(thd, spvar_list->head()->offset, items) : |