mariadb/sql
unknown 6574612df8 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.
2005-11-23 00:50:37 +02:00
..
examples Final patch for 5.0 for simplifying storage engine code. We now have just one set of ifdefs. I may also remove the code for creating new handlers. 2005-10-03 18:42:30 -07:00
share duplicate error message removed 2005-09-30 12:01:39 +02:00
.cvsignore
add_errmsg
client_settings.h
custom_conf.h
derror.cc Remove compiler warnings and remove not used variables 2005-02-25 16:53:22 +02:00
des_key_file.cc Merge mysql.com:/home/jimw/my/mysql-4.1-clean 2005-07-19 11:05:49 -07:00
discover.cc
field.cc Some minor fixes revealed as warnings by 2005-09-23 21:28:56 +03:00
field.h Added option --valgrind-mysqltest to mysql-test-run 2005-09-14 01:41:44 +03:00
field_conv.cc a fix (bug #7589: Decimal types are ignored when updating data from another column). 2005-09-21 14:32:19 +05:00
filesort.cc Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.1 2005-09-12 20:18:49 +03:00
frm_crypt.cc
gen_lex_hash.cc a fix (#10742: Can't compile "sql_lex.cc" on AIX 5.2). 2005-05-19 18:56:01 +05:00
gstream.cc fixes for windows 64-bit compiler warnings 2005-06-13 12:41:15 +02:00
gstream.h
ha_archive.cc Final patch for 5.0 for simplifying storage engine code. We now have just one set of ifdefs. I may also remove the code for creating new handlers. 2005-10-03 18:42:30 -07:00
ha_archive.h Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0 2005-10-02 20:13:18 -07:00
ha_berkeley.cc Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0 2005-10-03 21:09:01 -07:00
ha_berkeley.h Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0 2005-10-03 21:09:01 -07:00
ha_blackhole.cc Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0 2005-10-02 20:13:18 -07:00
ha_blackhole.h Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.1 2005-08-26 15:56:52 +03:00
ha_federated.cc Final patch for 5.0 for simplifying storage engine code. We now have just one set of ifdefs. I may also remove the code for creating new handlers. 2005-10-03 18:42:30 -07:00
ha_federated.h Improvement to federated for BUG#12659 2005-09-13 23:31:17 -07:00
ha_heap.cc Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0 2005-10-02 20:13:18 -07:00
ha_heap.h Always report row type of 'Fixed' for MEMORY tables. (Bug #3094) 2005-08-05 13:19:48 -07:00
ha_innodb.cc Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0 2005-10-03 21:09:01 -07:00
ha_innodb.h Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0 2005-10-03 21:09:01 -07:00
ha_myisam.cc Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0 2005-10-02 20:13:18 -07:00
ha_myisam.h A fix and a test case for Bug#10760 and complementary cleanups. 2005-07-19 22:21:12 +04:00
ha_myisammrg.cc Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0 2005-10-02 20:13:18 -07:00
ha_myisammrg.h A fix and a test case for Bug#10760 and complementary cleanups. 2005-07-19 22:21:12 +04:00
ha_ndbcluster.cc Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0 2005-10-03 21:09:01 -07:00
ha_ndbcluster.h Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0 2005-10-03 21:09:01 -07:00
handler.cc Final patch for 5.0 for simplifying storage engine code. We now have just one set of ifdefs. I may also remove the code for creating new handlers. 2005-10-03 18:42:30 -07:00
handler.h Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0 2005-10-03 21:09:01 -07:00
hash_filo.cc a compiler must see '#pragma implementation' *before* 2005-06-05 19:38:52 +02:00
hash_filo.h forgotten s/__GNUC__/USE_PRAGMA_INTERFACE/ causes compilation faliures 2005-05-27 14:15:08 +02:00
hostname.cc Backport of JimW's localhost patch to 4.1 tree. 2005-09-02 17:07:05 -07:00
init.cc Fixes during review of new pushed code 2005-08-12 13:54:42 +03:00
item.cc Fix for BUG#13549 "Server crash with nested stored procedures 2005-11-23 00:50:37 +02:00
item.h Fix for BUG#13549 "Server crash with nested stored procedures 2005-11-23 00:50:37 +02:00
item_buff.cc sql_select.cc: 2005-07-25 12:57:23 -07:00
item_cmpfunc.cc Merge 2005-09-29 03:20:31 +02:00
item_cmpfunc.h Merge 2005-09-29 03:20:31 +02:00
item_create.cc Fixed BUG#12963, BUG#13000: wrong VIEW creation with DAYNAME(), 2005-09-14 20:25:00 +04:00
item_create.h Fix for BUG#12335 (SP replication) : New binlogging strategy for stored PROCEDUREs/FUNCTIONs. 2005-08-25 17:34:34 +04:00
item_func.cc sql/item_func.cc 2005-09-21 14:36:55 +02:00
item_func.h Merge mysqldev@production.mysql.com:my/mysql-5.0-release 2005-09-23 00:46:59 +04:00
item_geofunc.cc Merge with 4.1 2005-06-07 00:31:53 +03:00
item_geofunc.h Merge neptunus.(none):/home/msvensson/mysql/bug10241 2005-05-09 11:26:48 +02:00
item_row.cc Name resolution context added (BUG#6443) 2005-07-01 07:05:42 +03:00
item_row.h Name resolution context added (BUG#6443) 2005-07-01 07:05:42 +03:00
item_strfunc.cc Merge mysql.com:/home/jimw/my/mysql-5.0-13361 2005-09-23 10:03:29 -07:00
item_strfunc.h Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0 2005-07-16 00:17:05 +03:00
item_subselect.cc A fix and a test case for Bug#6513 "Test Suite: Values inserted by using 2005-09-22 02:11:21 +04:00
item_subselect.h Rename: 2005-09-02 17:21:19 +04:00
item_sum.cc Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.0 2005-09-30 12:36:23 +03:00
item_sum.h Merge 4.1->5.0 2005-09-09 10:54:59 +04:00
item_timefunc.cc Fixed BUG#12963, BUG#13000: wrong VIEW creation with DAYNAME(), 2005-09-14 20:25:00 +04:00
item_timefunc.h Fixed BUG#12963, BUG#13000: wrong VIEW creation with DAYNAME(), 2005-09-14 20:25:00 +04:00
item_uniq.cc Merge with 4.1 2005-06-07 00:31:53 +03:00
item_uniq.h Name resolution context added (BUG#6443) 2005-07-01 07:05:42 +03:00
key.cc Fixes while reviewing new code 2005-05-06 11:39:30 +03:00
lex.h Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0 2005-08-25 17:39:02 +04:00
lex_symbol.h
lock.cc Fix for bug #12704 "Server crashes during trigger execution". 2005-09-15 03:56:09 +04:00
log.cc Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.0 2005-10-04 19:53:07 +03:00
log_event.cc Merge mysql.com:/users/lthalmann/bk/mysql-4.1 2005-09-02 11:01:00 +02:00
log_event.h Implement WL#2661 "Prepared Statements: Dynamic SQL in Stored Procedures". 2005-09-03 03:13:18 +04:00
Makefile.am Moving archive from example to sql. 2005-09-28 19:04:51 -07:00
matherr.c
mf_iocache.cc
my_decimal.cc Trimmed fix for bug #9546 (Crashing with huge decimals) 2005-05-06 19:04:58 +05:00
my_decimal.h Fix for bug #10896 (0.00 > -0.00) 2005-06-08 21:56:22 +05:00
my_lock.c
mysql_priv.h Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.0 2005-10-04 19:53:07 +03:00
mysqld.cc Fixed several boolean type options used in my_long_options[]. 2005-10-04 19:52:12 +03:00
mysqld_suffix.h
net_serv.cc Merge mysql.com:/home/jimw/my/mysql-4.1-clean 2005-09-12 17:00:50 -07:00
nt_servc.cc
nt_servc.h cleaned up mysql installation code for windows. 2005-02-09 22:02:48 +02:00
opt_range.cc BUG#13081: Disable ROR-index_merge for NDB tables (by adding a 2005-09-30 14:20:15 +04:00
opt_range.h Merge with 4.1 2005-06-07 00:31:53 +03:00
opt_sum.cc Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1 2005-09-28 11:34:53 +02:00
parse_file.cc Changes after discussion/review with Sanja 2005-09-18 21:43:28 +02:00
parse_file.h Changes after discussion/review with Sanja 2005-09-18 21:43:28 +02:00
password.c Bug#10504 2005-09-16 10:24:37 +05:00
procedure.cc Merge with 4.1 2005-06-07 00:31:53 +03:00
procedure.h Merge neptunus.(none):/home/msvensson/mysql/bug10241 2005-05-09 11:26:48 +02:00
protocol.cc Fix for BUG#13549 "Server crash with nested stored procedures 2005-11-23 00:50:37 +02:00
protocol.h Fix for BUG#13549 "Server crash with nested stored procedures 2005-11-23 00:50:37 +02:00
protocol_cursor.cc fix for bug#8692 2005-07-22 08:11:23 +02:00
records.cc Moved some old test and added a new test to only be run with mysql-test-run --big 2005-04-07 19:24:14 +03:00
repl_failsafe.cc WL#2787 (part 2, ver 3 (merged)) changed securety context switching 2005-09-15 22:29:07 +03:00
repl_failsafe.h
set_var.cc Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2005-09-21 17:42:44 +02:00
set_var.h Fixed BUG#12712: SET AUTOCOMMIT should fail within SP/functions/triggers 2005-09-13 17:16:12 +02:00
slave.cc Fixed several boolean type options used in my_long_options[]. 2005-10-04 19:52:12 +03:00
slave.h Fixed several boolean type options used in my_long_options[]. 2005-10-04 19:52:12 +03:00
sp.cc Fix for BUG#13549 "Server crash with nested stored procedures 2005-11-23 00:50:37 +02:00
sp.h Fix for bug #12704 "Server crashes during trigger execution". 2005-09-15 03:56:09 +04:00
sp_cache.cc Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2005-08-11 16:43:22 +03:00
sp_cache.h BUG#12228: Post review fixes: Added test case, code cleanup. 2005-08-10 21:17:02 +00:00
sp_head.cc Fix for BUG#13549 "Server crash with nested stored procedures 2005-11-23 00:50:37 +02:00
sp_head.h Merge mysqldev@production.mysql.com:my/mysql-5.0-release 2005-09-23 00:46:59 +04:00
sp_pcontext.cc Fixed BUG#13133: Local variables in stored procedures are not initialized correctly. 2005-09-13 12:50:21 +02:00
sp_pcontext.h Fixed BUG#13133: Local variables in stored procedures are not initialized correctly. 2005-09-13 12:50:21 +02:00
sp_rcontext.cc Fixed BUG#6127: Stored procedure handlers within handlers don't work 2005-09-26 18:22:00 +02:00
sp_rcontext.h Fix for BUG#13549 "Server crash with nested stored procedures 2005-11-23 00:50:37 +02:00
spatial.cc Merge mdk10.(none):/home/reggie/bk/mysql-4.1 2005-05-19 15:50:44 -05:00
spatial.h Fix warnings from icc 2005-05-18 19:00:21 +03:00
sql_acl.cc Fix for bug #13546 "Build errors with --with-embedded-server 2005-09-28 18:43:46 +04:00
sql_acl.h WL#2787 (Add view definer/owner to the view definition (.frm) to check privileges on used tables and stored routines when using a VIEW.) 2005-09-20 21:20:38 +03:00
sql_analyse.cc Merge ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-4.1 2005-09-13 18:23:37 +03:00
sql_analyse.h Merge from 4.1 2005-05-26 21:01:55 +02:00
sql_array.h Fix for BUG#12335 (SP replication) : New binlogging strategy for stored PROCEDUREs/FUNCTIONs. 2005-08-25 17:34:34 +04:00
sql_base.cc Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0 2005-10-04 04:03:48 +02:00
sql_bitmap.h Bug#10932 - Building server with key limit of 128, makes test cases fail 2005-07-19 14:13:56 +02:00
sql_cache.cc Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2005-09-30 16:51:35 +02:00
sql_cache.h Fix for BUG#13549 "Server crash with nested stored procedures 2005-11-23 00:50:37 +02:00
sql_class.cc Fix for BUG#13549 "Server crash with nested stored procedures 2005-11-23 00:50:37 +02:00
sql_class.h Fix for BUG#13549 "Server crash with nested stored procedures 2005-11-23 00:50:37 +02:00
sql_client.cc
sql_crypt.cc a compiler must see '#pragma implementation' *before* 2005-06-05 19:38:52 +02:00
sql_crypt.h Add ifdefs to control when "#pragma implementation" should be used 2005-05-26 12:09:14 +02:00
sql_cursor.cc A fix and a test case for Bug#6513 "Test Suite: Values inserted by using 2005-09-22 02:11:21 +04:00
sql_cursor.h A fix and a test case for Bug#6513 "Test Suite: Values inserted by using 2005-09-22 02:11:21 +04:00
sql_db.cc Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2005-09-30 16:51:35 +02:00
sql_delete.cc Move handler specific options into handlerton flag check 2005-09-30 16:26:48 -07:00
sql_derived.cc A fix and a test case for Bug#6513 "Test Suite: Values inserted by using 2005-09-22 02:11:21 +04:00
sql_do.cc Name resolution context added (BUG#6443) 2005-07-01 07:05:42 +03:00
sql_error.cc merge 2005-07-05 11:38:05 +03:00
sql_error.h Invalid DEFAULT values for CREATE TABLE now generates errors. (Bug #5902) 2005-04-01 15:04:50 +03:00
sql_handler.cc Fix for bug #12704 "Server crashes during trigger execution". 2005-09-15 03:56:09 +04:00
sql_help.cc Added option --valgrind-mysqltest to mysql-test-run 2005-09-14 01:41:44 +03:00
sql_insert.cc WL#2787 (part 2, ver 3 (merged)) changed securety context switching 2005-09-15 22:29:07 +03:00
sql_lex.cc Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1 2005-09-28 11:34:53 +02:00
sql_lex.h Merge mysqldev@production.mysql.com:my/mysql-5.0-release 2005-09-23 00:46:59 +04:00
sql_list.cc a compiler must see '#pragma implementation' *before* 2005-06-05 19:38:52 +02:00
sql_list.h A fix and a test case for Bug#6513 "Test Suite: Values inserted by using 2005-09-22 02:11:21 +04:00
sql_load.cc Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1 2005-09-28 11:34:53 +02:00
sql_manager.cc
sql_manager.h
sql_map.cc WL#2286 - Compile MySQL w/YASSL support 2005-06-22 14:08:28 +05:00
sql_map.h Add ifdefs to control when "#pragma implementation" should be used 2005-05-26 12:09:14 +02:00
sql_olap.cc Implementation of WL#2486 - 2005-08-12 17:57:19 +03:00
sql_parse.cc Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.0 2005-09-30 13:56:32 +03:00
sql_prepare.cc Fixed error found during review of new pushed code 2005-09-25 21:22:23 +03:00
sql_rename.cc Changes after discussion/review with Sanja 2005-09-18 21:43:28 +02:00
sql_repl.cc Bug#9683 INFORMATION_SCH: Creation of temporary table allowed in 2005-09-13 16:07:38 +05:00
sql_repl.h WL#874 "Extended LOAD DATA". 2005-03-16 04:32:47 +03:00
sql_select.cc Fix for BUG#13455: Make "ref" optimizer able to make this inference: 2005-09-30 01:34:19 +04:00
sql_select.h A fix and a test case for Bug#6513 "Test Suite: Values inserted by using 2005-09-22 02:11:21 +04:00
sql_show.cc Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0 2005-10-02 20:13:18 -07:00
sql_sort.h
sql_state.c
sql_string.cc Merge with 4.1 2005-06-07 00:31:53 +03:00
sql_string.h Bug#8610: The ucs2_turkish_ci collation fails with upper('i') 2005-06-06 16:54:15 +05:00
sql_table.cc Merge mysqldev@production.mysql.com:/data0/mysqldev/my/mysql-5.0-release 2005-10-04 18:10:38 +02:00
sql_test.cc Merge mysql.com:/home/mydev/mysql-4.1-4100 2005-09-14 13:37:16 +02:00
sql_trigger.cc Fix for BUG#13549 "Server crash with nested stored procedures 2005-11-23 00:50:37 +02:00
sql_trigger.h Fix for bug #12704 "Server crashes during trigger execution". 2005-09-15 03:56:09 +04:00
sql_udf.cc Added option --valgrind-mysqltest to mysql-test-run 2005-09-14 01:41:44 +03:00
sql_udf.h Name resolution context added (BUG#6443) 2005-07-01 07:05:42 +03:00
sql_union.cc A fix and a test case for Bug#6513 "Test Suite: Values inserted by using 2005-09-22 02:11:21 +04:00
sql_update.cc Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1 2005-09-28 11:34:53 +02:00
sql_view.cc Fix for bug #13629 "view test crashes for debug build" (also includes better 2005-09-30 17:30:33 +04:00
sql_view.h Fix for bug#5508 after Sanja's review 2005-09-16 17:13:21 +02:00
sql_yacc.yy Fix for BUG#13549 "Server crash with nested stored procedures 2005-11-23 00:50:37 +02:00
stacktrace.c Step 2 of the switch to support configuration with NPTL: 2005-04-20 20:38:57 +02:00
stacktrace.h Step 2 of the switch to support configuration with NPTL: 2005-04-20 20:38:57 +02:00
strfunc.cc Remove compiler warnings and remove not used variables 2005-02-25 16:53:22 +02:00
structs.h Merge mysql.com:/home/mydev/mysql-4.1-4100 2005-09-14 13:37:16 +02:00
table.cc Merge mysqldev@production.mysql.com:/data0/mysqldev/my/mysql-5.0-release 2005-10-04 18:10:38 +02:00
table.h sql_table.cc, table.cc, table.h: 2005-10-04 17:04:20 +02:00
thr_malloc.cc
time.cc Fixes during review of new pushed code 2005-07-31 12:49:55 +03:00
tzfile.h
tztime.cc Added option --valgrind-mysqltest to mysql-test-run 2005-09-14 01:41:44 +03:00
tztime.h Fixes during review of new pushed code 2005-07-31 12:49:55 +03:00
udf_example.cc
uniques.cc Code cleanups during code reviews 2005-06-01 16:35:09 +03:00
unireg.cc some last minute Windows compile fixes and makefile corrections 2005-09-15 14:32:01 -05:00
unireg.h unireg.h: 2005-08-27 01:50:38 +02:00
watchdog_mysqld