1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fix for BUG#13549 "Server crash with nested stored procedures

if inner routine has more local variables than outer one, and
one of its last variables was used as argument to NOT operator".

THD::spcont was non-0 when we were parsing stored routine/trigger
definition during execution of another stored routine. This confused
methods of Item_splocal and forced them use wrong runtime context.
Fix ensures that we always have THD::spcont equal to zero during
routine/trigger body parsing. This also allows to avoid problems
with errors which occur during parsing and SQL exception handlers.
This commit is contained in:
bell@sanja.is.com.ua
2005-11-23 00:50:37 +02:00
parent debff3e632
commit 2bcd68973b
16 changed files with 178 additions and 27 deletions

View File

@ -2075,6 +2075,13 @@ public:
class my_var : public Sql_alloc {
public:
LEX_STRING s;
#ifndef DEBUG_OFF
/*
Routine to which this Item_splocal belongs. Used for checking if correct
runtime context is used for variable handling.
*/
sp_head *owner;
#endif
bool local;
uint offset;
enum_field_types type;