mariadb/sql
Dmitry Lenev 095e8271b7 Bug #15954896 "SP, MULTI-TABLE DELETE AND LONG ALIAS".
Using too long table aliases in stored routines might
have caused server crashes.

Code in sp_head::merge_table_list() which is responsible 
for collecting information about tables used in stored
routine was not aware of the fact that table alias might
have arbitrary length. I.e. it assumed that table alias
can't be longer than NAME_LEN bytes and allocated buffer
for a key identifying table accordingly.

This patch fixes the issue by ensuring that we use
dynamically allocated buffer for table key when table
alias is too long. By default stack based buffer is used
in which NAME_LEN bytes are reserved for table alias.
2012-12-05 19:26:56 +04:00
..
examples
share Fixing wrong copyright. Index.xml was modified in 2005, 2012-07-24 09:27:00 +04:00
.cvsignore
add_errmsg
authors.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
client_settings.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
CMakeLists.txt Updated/added copyright headers 2012-02-15 17:21:38 +01:00
contributors.h
custom_conf.h
debug_sync.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
debug_sync.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
derror.cc
des_key_file.cc
discover.cc
event_data_objects.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
event_data_objects.h
event_db_repository.cc Updated/added copyright headers 2011-07-03 17:47:37 +02:00
event_db_repository.h Updated/added copyright headers 2011-07-03 17:47:37 +02:00
event_parse_data.cc Updated/added copyright headers 2011-07-03 17:47:37 +02:00
event_parse_data.h Updated/added copyright headers 2011-07-03 17:47:37 +02:00
event_queue.cc
event_queue.h
event_scheduler.cc Bug#12636001 : deadlock from thd_security_context 2012-05-17 18:07:59 +05:30
event_scheduler.h
events.cc Updated/added copyright headers 2011-07-03 17:47:37 +02:00
events.h
field.cc minor update to make MSVS happy 2012-06-29 18:24:43 +04:00
field.h Backmerge of BUG#12997905 2011-11-18 14:47:11 +01:00
field_conv.cc Updated/added copyright headers 2012-02-15 17:21:38 +01:00
filesort.cc Bug#14111180 HANDLE_FATAL_SIGNAL IN PTR_COMPARE_1 / QUEUE_INSERT 2012-07-27 09:13:10 +02:00
frm_crypt.cc
gen_lex_hash.cc Bug#13928675 MYSQL CLIENT COPYRIGHT NOTICE MUST 2012-08-07 18:58:19 +05:30
gstream.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
gstream.h
ha_ndbcluster.cc Updated/added copyright headers 2011-07-03 17:47:37 +02:00
ha_ndbcluster.h
ha_ndbcluster_binlog.cc BUG#14548159: Followup patch to fix some issues on PB2 2012-09-23 15:45:22 +05:30
ha_ndbcluster_binlog.h
ha_ndbcluster_cond.cc
ha_ndbcluster_cond.h
ha_ndbcluster_tables.h
ha_partition.cc Bug#14845133: 2012-11-13 09:21:59 +01:00
ha_partition.h Bug#13025132 - PARTITIONS USE TOO MUCH MEMORY 2012-08-17 14:25:32 +02:00
handler.cc Bug #11765218 58157: INNODB LOCKS AN UNMATCHED ROW EVEN THOUGH USING 2012-07-12 16:42:07 +05:30
handler.h Updated/added copyright headers 2011-07-03 17:47:37 +02:00
hash_filo.cc
hash_filo.h
hostname.cc Bug#11753779: MAX_CONNECT_ERRORS WORKS ONLY WHEN 1ST 2012-09-17 17:02:17 +05:30
init.cc
item.cc Bug #14409015 MEMORY LEAK WHEN REFERENCING OUTER FIELD IN HAVING 2012-08-09 15:34:52 +04:00
item.h Bug#12601974 - STORED PROCEDURE SQL_MODE=NO_BACKSLASH_ESCAPES IGNORED AND BREAKS REPLICATION 2012-02-29 12:23:15 +05:30
item_buff.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
item_cmpfunc.cc Backport 2012-09-25 16:03:05 +02:00
item_cmpfunc.h Bug#13012483:EXPLAIN EXTENDED, PREPARED STATEMENT, CRASH IN 2012-02-24 11:53:36 +05:30
item_create.cc Updated/added copyright headers 2011-07-03 17:47:37 +02:00
item_create.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
item_func.cc Bug#11745891 - LAST_INSERT(ID) DOES NOT SUPPORT BIGINT UNSIGNED 2012-10-16 23:18:48 +05:30
item_func.h Bug#11745891 - LAST_INSERT(ID) DOES NOT SUPPORT BIGINT UNSIGNED 2012-10-16 23:18:48 +05:30
item_geofunc.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
item_geofunc.h
item_row.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
item_row.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
item_strfunc.cc Bug #14099846: EXPORT_SET CRASHES DUE TO OVERALLOCATION OF MEMORY 2012-08-05 16:29:28 +05:30
item_strfunc.h Updated/added copyright headers 2011-07-03 17:47:37 +02:00
item_subselect.cc Bug #14409015 MEMORY LEAK WHEN REFERENCING OUTER FIELD IN HAVING 2012-08-09 15:34:52 +04:00
item_subselect.h Updated/added copyright headers 2012-02-15 17:21:38 +01:00
item_sum.cc Updated/added copyright headers 2012-02-15 17:13:47 +01:00
item_sum.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
item_timefunc.cc Updated/added copyright headers 2012-02-15 17:21:38 +01:00
item_timefunc.h Updated/added copyright headers 2011-07-03 17:47:37 +02:00
item_xmlfunc.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
item_xmlfunc.h
key.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
lex.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
lex_symbol.h
lock.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
log.cc BUG#14548159: NUMEROUS CASES OF INCORRECT IDENTIFIER 2012-09-22 17:50:51 +05:30
log.h Bug#14238406 NEW COMPILATION WARNINGS WITH GCC 4.7 (-WERROR=NARROWING) 2012-06-29 13:25:57 +02:00
log_event.cc Bug#11764602 ASSERTION IN 2012-12-01 08:04:33 +08:00
log_event.h Bug#11764602 ASSERTION IN 2012-12-01 08:04:33 +08:00
log_event_old.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
log_event_old.h
Makefile.am new header file must be listed in Makefile.am 2012-04-18 14:13:13 +02:00
mem_root_array.h Backport 5.5=>5.1 Patch for Bug#13805127: 2012-04-18 13:14:05 +02:00
message.h
message.mc
message.rc
mf_iocache.cc
MSG00001.bin
my_decimal.cc Updated/added copyright headers 2011-07-03 17:47:37 +02:00
my_decimal.h Updated/added copyright headers 2012-02-15 17:21:38 +01:00
my_lock.c
mysql_priv.h BUG#14629727: USER_VAR_EVENT IS MISSING RANGE CHECKS 2012-10-21 20:28:19 +01:00
mysql_priv.h.pp
mysqld.cc Bug#14234028 - CRASH DURING SHUTDOWN WITH BACKGROUND PURGE THREAD 2012-11-08 15:14:29 +05:30
mysqld_suffix.h
net_serv.cc
nt_servc.cc
nt_servc.h
opt_range.cc Updated/added copyright headers 2011-07-03 17:47:37 +02:00
opt_range.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
opt_sum.cc Updated/added copyright headers 2011-07-03 17:47:37 +02:00
parse_file.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
parse_file.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
partition_element.h
partition_info.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
partition_info.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
password.c Bug #13934049: 64884: LOGINS WITH INCORRECT PASSWORD ARE ALLOWED 2012-04-06 12:04:07 +03:00
procedure.cc
procedure.h
protocol.cc Bug #13708485: malformed resultset packet crashes client 2012-06-28 18:38:55 +03:00
protocol.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
records.cc Bug#14051002 VALGRIND: CONDITIONAL JUMP OR MOVE IN RR_CMP / MY_QSORT 2012-06-05 15:53:39 +02:00
repl_failsafe.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
repl_failsafe.h
rpl_constants.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
rpl_filter.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
rpl_filter.h
rpl_injector.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
rpl_injector.h
rpl_mi.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
rpl_mi.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
rpl_record.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
rpl_record.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
rpl_record_old.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
rpl_record_old.h
rpl_reporting.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
rpl_reporting.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
rpl_rli.cc BUG#11754117 incorrect logging of INSERT into auto-increment 2012-04-20 19:41:20 +03:00
rpl_rli.h BUG#11754117 incorrect logging of INSERT into auto-increment 2012-04-20 19:41:20 +03:00
rpl_tblmap.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
rpl_tblmap.h
rpl_utility.cc BUG#11754117 incorrect logging of INSERT into auto-increment 2012-04-20 19:41:20 +03:00
rpl_utility.h BUG#11762670:MY_B_WRITE RETURN VALUE IGNORED 2012-07-10 14:23:17 +05:30
scheduler.cc
scheduler.h
set_var.cc BUG#12400221 - 60926: BINARY LOG EVENTS LARGER THAN MAX_ALLOWED_PACKET 2012-05-21 12:57:39 +05:30
set_var.h
signal_handler.cc Bug#11761576 54082: HANDLE_SEGFAULT MAKES USE OF UNSAFE FUNCTIONS 2012-03-06 13:30:30 +01:00
slave.cc BUG#12400221 - 60926: BINARY LOG EVENTS LARGER THAN MAX_ALLOWED_PACKET 2012-06-12 12:59:13 +05:30
slave.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sp.cc Updated/added copyright headers 2011-07-03 17:47:37 +02:00
sp.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sp_cache.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sp_cache.h
sp_head.cc Bug #15954896 "SP, MULTI-TABLE DELETE AND LONG ALIAS". 2012-12-05 19:26:56 +04:00
sp_head.h Backport from mysql-trunk of: 2012-01-09 11:28:02 +01:00
sp_pcontext.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sp_pcontext.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sp_rcontext.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sp_rcontext.h
spatial.cc Backporting Bug 14100466 from 5.6. 2012-08-17 13:14:04 +04:00
spatial.h Backporting Bug 14100466 from 5.6. 2012-08-17 13:14:04 +04:00
sql_acl.cc Bug#15912213: BUFFER OVERFLOW IN ACL_GET() 2012-11-29 17:23:23 +05:30
sql_acl.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_analyse.cc Updated/added copyright headers 2011-07-03 17:47:37 +02:00
sql_analyse.h
sql_array.h
sql_base.cc BUG#14548159: NUMEROUS CASES OF INCORRECT IDENTIFIER 2012-09-22 17:50:51 +05:30
sql_binlog.cc Updated/added copyright headers 2011-07-03 17:47:37 +02:00
sql_bitmap.h
sql_builtin.cc.in
sql_cache.cc Updated/added copyright headers 2012-02-15 17:21:38 +01:00
sql_cache.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_class.cc Bug#12636001 : deadlock from thd_security_context 2012-05-17 18:07:59 +05:30
sql_class.h Solve a linkage problem with "libmysqld" on several Solaris platforms: 2012-06-26 16:30:15 +02:00
sql_client.cc
sql_connect.cc Bug#11753779: MAX_CONNECT_ERRORS WORKS ONLY WHEN 1ST 2012-09-17 17:02:17 +05:30
sql_crypt.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_crypt.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_cursor.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_cursor.h
sql_db.cc BUG#14548159: NUMEROUS CASES OF INCORRECT IDENTIFIER 2012-09-22 17:50:51 +05:30
sql_delete.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_derived.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_do.cc
sql_error.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_error.h
sql_handler.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_help.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_insert.cc BUG#14548159: NUMEROUS CASES OF INCORRECT IDENTIFIER 2012-09-22 17:50:51 +05:30
sql_lex.cc Bug#14683676 ENDLESS MEMORY CONSUMPTION IN SETUP_REF_ARRAY WITH MAX IN SUBQUERY 2012-10-01 13:12:38 +02:00
sql_lex.h Backport 5.5=>5.1 Patch for Bug#13805127: 2012-04-18 13:14:05 +02:00
sql_list.cc
sql_list.h Backport Bug#13724099 2012-09-12 08:36:12 +02:00
sql_load.cc BUG#14548159: NUMEROUS CASES OF INCORRECT IDENTIFIER 2012-09-22 17:50:51 +05:30
sql_locale.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_manager.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_map.cc
sql_map.h
sql_olap.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_parse.cc Bug#12636001 : deadlock from thd_security_context 2012-05-17 18:07:59 +05:30
sql_partition.cc
sql_partition.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_plugin.cc Updated/added copyright headers 2011-07-03 17:47:37 +02:00
sql_plugin.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_prepare.cc BUG#13868860 - LIMIT '5' IS EXECUTED WITHOUT ERROR WHEN '5' 2012-07-26 23:44:43 +05:30
sql_profile.cc Bug#14629232 SECURITY VULNERABILITY WITH SHOW PROFILE 2012-10-12 19:38:45 +02:00
sql_profile.h Bug#14629232 SECURITY VULNERABILITY WITH SHOW PROFILE 2012-10-12 19:38:45 +02:00
sql_rename.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_repl.cc BUG#12359942 - REPLICATION TEST FROM ENGINE SUITE RPL_ROW_UNTIL TIMES OUT 2012-11-30 12:12:33 +05:30
sql_repl.h
sql_select.cc Bug#13726751 - 8 BYTE MEMORY LEAK IN DO_SAVE_BLOB 2012-10-18 23:45:15 +05:30
sql_select.h Updated/added copyright headers 2011-07-03 17:47:37 +02:00
sql_servers.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_servers.h
sql_show.cc BUG#14548159: NUMEROUS CASES OF INCORRECT IDENTIFIER 2012-09-22 17:50:51 +05:30
sql_show.h BUG#14548159: NUMEROUS CASES OF INCORRECT IDENTIFIER 2012-09-22 17:50:51 +05:30
sql_sort.h
sql_state.c
sql_string.cc Updated/added copyright headers 2012-02-15 17:13:47 +01:00
sql_string.h Backport of Bug#14171740 65562: STRING::SHRINK SHOULD BE A NO-OP WHEN ALLOCED=0 2012-07-26 15:05:24 +02:00
sql_table.cc merge of bug#14589559 into mysql-5.1 2012-12-01 09:07:03 +01:00
sql_tablespace.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_test.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_trigger.cc Updated/added copyright headers 2011-07-03 17:47:37 +02:00
sql_trigger.h Updated/added copyright headers 2011-07-03 17:47:37 +02:00
sql_udf.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_udf.h
sql_union.cc Bug#11765255 - 58201: VALGRIND/CRASH WHEN ORDERING BY MULTIPLE AGGREGATE FUNCTIONS 2011-07-11 11:20:19 +02:00
sql_update.cc
sql_view.cc Updated/added copyright headers 2012-02-15 17:13:47 +01:00
sql_view.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql_yacc.yy minor update to make MSVS happy 2012-06-29 18:24:43 +04:00
strfunc.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
structs.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
table.cc Backport of fix for Bug#12763207 - ASSERT IN SUBSELECT::SINGLE_VALUE_TRANSFORMER 2012-03-27 14:39:27 +02:00
table.h Bug#13580775 ASSERTION FAILED: RECORD_LENGTH == M_RECORD_LENGTH 2012-01-27 11:13:13 +01:00
thr_malloc.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
time.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
tzfile.h
tztime.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
tztime.h Updated/added copyright headers 2011-06-30 17:37:13 +02:00
udf_example.c Updated/added copyright headers 2011-06-30 17:37:13 +02:00
udf_example.def
uniques.cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
unireg.cc Updated/added copyright headers 2011-07-03 17:47:37 +02:00
unireg.h Updated/added copyright headers 2012-02-15 17:21:38 +01:00