summaryrefslogtreecommitdiff
path: root/sql/protocol.h
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2005-11-23 00:50:37 +0200
committerunknown <bell@sanja.is.com.ua>2005-11-23 00:50:37 +0200
commit6574612df871c5803fe79e547a20053470e39797 (patch)
treebc5ba9cedbf44fad4c73c720d01700644e2e032e /sql/protocol.h
parent3410309f26553048c17f7ca2d269dfdc72a150ad (diff)
downloadmariadb-git-6574612df871c5803fe79e547a20053470e39797.tar.gz
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. mysql-test/r/sp.result: Test suite for bug#13549. mysql-test/r/trigger.result: Test suite for bug#13549. mysql-test/t/sp.test: Test suite for bug#13549. mysql-test/t/trigger.test: Test suite for bug#13549. sql/item.cc: Protection against using wrong context by SP local variable. sql/item.h: Protection against using wrong context by SP local variable. sql/protocol.cc: An incorrect macro name fixed. sql/protocol.h: An incorrect macro name fixed. sql/sp.cc: Do not allow SP which we are parsing to use other SP context (BUG#13549). sql/sp_head.cc: Protection against using wrong context by SP local variable. sql/sp_rcontext.h: Protection against using wrong context by SP local variable. sql/sql_cache.h: An incorrect macro name fixed. sql/sql_class.cc: Protection against using wrong context by SP local variable. sql/sql_class.h: Protection against using wrong context by SP local variable. sql/sql_trigger.cc: Do not allow Trigger which we are parsing to use other SP context (BUG#13549). sql/sql_yacc.yy: Protection against using wrong context by SP local variable.
Diffstat (limited to 'sql/protocol.h')
-rw-r--r--sql/protocol.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/protocol.h b/sql/protocol.h
index c00bbba4cc9..8d9da5774b2 100644
--- a/sql/protocol.h
+++ b/sql/protocol.h
@@ -31,7 +31,7 @@ protected:
String *packet;
String *convert;
uint field_pos;
-#ifndef DEBUG_OFF
+#ifndef DBUG_OFF
enum enum_field_types *field_types;
#endif
uint field_count;