Commit 71a0a12e authored by Alexander Barkov's avatar Alexander Barkov

Changing a LEX::sp_variable_declarations_finalize() parameter

from "const Lex_field_type_st &" to "const Column_definition &".
parent 8ec4cf1f
......@@ -5199,7 +5199,7 @@ void LEX::sp_variable_declarations_init(THD *thd, int nvars)
}
bool LEX::sp_variable_declarations_finalize(THD *thd, int nvars,
const Lex_field_type_st &type,
const Column_definition &cdef,
Item *dflt_value_item)
{
uint num_vars= spcont->context_var_count();
......@@ -5219,7 +5219,7 @@ bool LEX::sp_variable_declarations_finalize(THD *thd, int nvars,
return true;
if (!last)
spvar->field_def= *last_field;
spvar->field_def= cdef;
spvar->default_value= dflt_value_item;
spvar->field_def.field_name= spvar->name.str;
......@@ -5233,7 +5233,7 @@ bool LEX::sp_variable_declarations_finalize(THD *thd, int nvars,
sp_instr_set *is= new (this->thd->mem_root)
sp_instr_set(sphead->instructions(),
spcont, var_idx, dflt_value_item,
type.field_type(), this, last);
spvar->field_def.sql_type, this, last);
if (is == NULL || sphead->add_instr(is))
return true;
}
......
......@@ -3099,7 +3099,7 @@ struct LEX: public Query_tables_list
LEX_STRING name);
void sp_variable_declarations_init(THD *thd, int nvars);
bool sp_variable_declarations_finalize(THD *thd, int nvars,
const Lex_field_type_st &type,
const Column_definition &cdef,
Item *def);
bool sp_handler_declaration_init(THD *thd, int type);
bool sp_handler_declaration_finalize(THD *thd, int type);
......
......@@ -2967,7 +2967,8 @@ sp_decl_body:
type_with_opt_collate
sp_opt_default
{
if (Lex->sp_variable_declarations_finalize(thd, $1, $3, $4))
if (Lex->sp_variable_declarations_finalize(thd, $1,
Lex->last_field[0], $4))
MYSQL_YYABORT;
$$.vars= $1;
$$.conds= $$.hndlrs= $$.curs= 0;
......
......@@ -2373,7 +2373,8 @@ sp_decl_body:
type_with_opt_collate
sp_opt_default
{
if (Lex->sp_variable_declarations_finalize(thd, $1, $3, $4))
if (Lex->sp_variable_declarations_finalize(thd, $1,
Lex->last_field[0], $4))
MYSQL_YYABORT;
$$.vars= $1;
$$.conds= $$.hndlrs= $$.curs= 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment