mirror of
https://github.com/MariaDB/server.git
synced 2026-04-22 08:15:31 +02:00
Fixed BUG#2776: Stored procedure crash if variable assigned to default.
Keep track on the default value and use it. (Or NULL, if not declared.) mysql-test/r/sp.result: New testcases for BUG#2776. mysql-test/t/sp.test: New testcases for BUG#2776. sql/sp_pcontext.cc: Initialize local variable default value. sql/sp_pcontext.h: New method for saving default value. sql/sql_yacc.yy: If DEFAULT is use as a value in SET variable = ... in an SP, actually use the default.
This commit is contained in:
parent
91dcd01159
commit
c22ccc136b
5 changed files with 75 additions and 3 deletions
|
|
@ -118,6 +118,7 @@ sp_pcontext::push_pvar(LEX_STRING *name, enum enum_field_types type,
|
|||
p->mode= mode;
|
||||
p->offset= m_pvar.elements;
|
||||
p->isset= (mode == sp_param_out ? FALSE : TRUE);
|
||||
p->dflt= NULL;
|
||||
insert_dynamic(&m_pvar, (gptr)&p);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue