mariadb/mysql-test/include
davi@endora.local cc007acb78 Bug#30882 Dropping a temporary table inside a stored function may cause a server crash
If a stored function that contains a drop temporary table statement
is invoked by a create temporary table of the same name may cause
a server crash. The problem is that when dropping a table no check
is done to ensure that table is not being used by some outer query
(or outer statement), potentially leaving the outer query with a
reference to a stale (freed) table.

The solution is when dropping a temporary table, always check if
the table is being used by some outer statement as a temporary
table can be dropped inside stored procedures.

The check is performed by looking at the TABLE::query_id value for
temporary tables. To simplify this check and to solve a bug related
to handling of temporary tables in prelocked mode, this patch changes
the way in which this member is used to track the fact that table is
used/unused. Now we ensure that TABLE::query_id is zero for unused
temporary tables (which means that all temporary tables which were
used by a statement should be marked as free for reuse after it's
execution has been completed).
2007-11-01 18:52:56 -02:00
..
add_anonymous_users.inc Bug#20166 mysql-test-run.pl does not test system privilege tables creation 2007-02-26 11:49:24 +01:00
analyze_failure_sync_with_master.test Add analyze_testcase_failure which is called when mysqltest has failed 2006-10-24 17:36:46 +02:00
big_test.inc
check-testcase.test Print names of testcases that failed check_testcase, this makes it easier 2006-10-08 17:48:01 +02:00
check_var_limit.inc
common-tests.inc Added --pipe option for faster compile 2006-06-06 20:21:36 +03:00
concurrent.inc This changeset belongs to 2006-08-16 14:58:49 +02:00
ctype_common.inc Fix for bug #31069: crash in 'sounds like' 2007-10-04 10:20:00 +05:00
ctype_filesort.inc
ctype_innodb_like.inc
ctype_like_escape.inc Add printout of file in which warning was detected 2006-10-06 00:57:10 +02:00
ddl_i18n.check_events.inc Patch for the following bugs: 2007-06-28 21:34:54 +04:00
ddl_i18n.check_sp.inc Patch for the following bugs: 2007-06-28 21:34:54 +04:00
ddl_i18n.check_triggers.inc Patch for the following bugs: 2007-06-28 21:34:54 +04:00
ddl_i18n.check_views.inc Patch for the following bugs: 2007-06-28 21:34:54 +04:00
deadlock.inc Merge moksha.local:/Users/davi/mysql/push/bugs/25164-5.0 2007-08-27 10:19:58 -03:00
delete_anonymous_users.inc Bug#20166 mysql-test-run.pl does not test system privilege tables creation 2007-02-26 11:49:24 +01:00
endspace.inc
federated.inc Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work-nn 2007-05-15 11:33:19 +02:00
federated_cleanup.inc Fixed federated and some replication tests to not stop slave until it's up and running. 2007-04-17 14:41:16 +03:00
get_binlog_dump_thread_id.inc Workaround non portable use of "grep" and "cut" by loading the whole processlist 2007-02-26 09:16:22 +01:00
gis_generic.inc Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/50 2007-03-29 12:00:32 +02:00
gis_keys.inc Bug #30825: Problems when putting a non-spatial index on a GIS column 2007-10-10 16:26:02 +03:00
grant_cache.inc This changeset belongs to the fix of Bug#735 Prepared Statements: there is no support for Query Cache 2007-05-24 22:13:49 +02:00
handler.inc Bug#30882 Dropping a temporary table inside a stored function may cause a server crash 2007-11-01 18:52:56 -02:00
have_archive.inc compilation error fix 2007-06-09 16:05:43 +05:00
have_big5.inc
have_binlog_format_mixed.inc Bug#28369 rpl test cases fail with binlog disabled 2007-06-07 19:20:49 +02:00
have_binlog_format_mixed_or_row.inc Bug#28369 rpl test cases fail with binlog disabled 2007-06-07 19:20:49 +02:00
have_binlog_format_mixed_or_statement.inc Add "have_log_bin" requirement for fast skip when running without binlog 2007-06-07 20:35:32 +02:00
have_binlog_format_row.inc Bug#28369 rpl test cases fail with binlog disabled 2007-06-07 19:20:49 +02:00
have_binlog_format_statement.inc Bug#28369 rpl test cases fail with binlog disabled 2007-06-07 19:20:49 +02:00
have_blackhole.inc compilation error fix 2007-06-09 16:05:43 +05:00
have_bug25714.inc fix bug in test case for bug#25714 2007-08-28 16:06:08 +02:00
have_case_sensitive_file_system.inc
have_compress.inc
have_cp866.inc Patch for the following bugs: 2007-06-28 21:34:54 +04:00
have_cp932.inc
have_cp1250_ch.inc
have_cp1251.inc Patch for the following bugs: 2007-06-28 21:34:54 +04:00
have_crypt.inc
have_csv.inc compilation error fix 2007-06-09 16:05:43 +05:00
have_debug.inc
have_eucjpms.inc
have_euckr.inc
have_example_plugin.inc Add support for loading example plugin and add plugin.test 2006-12-15 00:09:56 +01:00
have_exampledb.inc compilation error fix 2007-06-09 16:05:43 +05:00
have_federated_db.inc compilation error fix 2007-06-09 16:05:43 +05:00
have_gb2312.inc
have_gbk.inc
have_geometry.inc
have_innodb.inc compilation error fix 2007-06-09 16:05:43 +05:00
have_koi8r.inc Patch for the following bugs: 2007-06-28 21:34:54 +04:00
have_latin2_ch.inc
have_log_bin.inc files to check if log bin is turned on 2007-05-14 14:38:50 +02:00
have_lowercase0.inc Backport test cases fixes from 5.0 2006-10-19 10:54:23 +02:00
have_lowercase1.inc Bug #27653: Temp table can't be created if lower_case_table_names=1 and 2007-04-30 23:16:46 +02:00
have_multi_ndb.inc Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb 2007-06-18 23:55:48 +02:00
have_ndb.inc Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb 2007-07-13 15:59:06 +02:00
have_ndb_extra.inc
have_ndbapi_examples.inc Fixed ndbapi-examples, and added tests for mysql-test-run.pl 2006-09-01 15:14:50 +02:00
have_outfile.inc Change "exec rm" to "remove_file" 2007-06-27 18:21:20 +02:00
have_partition.inc
have_query_cache.inc Fix for BUG#735 "Prepared Statements: there is no support for Query 2007-03-09 18:09:57 +01:00
have_sjis.inc
have_ssl.inc Add "have_ssl" as synonym for "have_openssl" 2007-03-05 10:03:42 +01:00
have_symlink.inc Fix for valgrind errors in test: require symlink support for partition_not_windows.test 2007-04-25 20:21:55 +02:00
have_tis620.inc
have_ucs2.inc
have_udf.inc Add support for loading example plugin and add plugin.test 2006-12-15 00:09:56 +01:00
have_ujis.inc
have_utf8.inc Patch for the following bugs: 2007-06-28 21:34:54 +04:00
index_merge1.inc Merge magare.gmz:/home/kgeorge/mysql/work/mysql-5.0-opt 2007-07-18 15:56:29 +03:00
index_merge2.inc Merge chilla.local:/home/mydev/mysql-5.1--main 2006-09-14 21:44:17 +02:00
index_merge_2sweeps.inc This changeset belongs to 2006-08-16 14:58:49 +02:00
index_merge_ror.inc Merge mysql.com:/home/svoj/devel/mysql/BUG25048/mysql-5.0-engines 2006-12-26 18:04:31 +04:00
index_merge_ror_cpk.inc This changeset belongs to 2006-08-16 14:58:49 +02:00
innodb_rollback_on_timeout.inc Added innodb_rollback_on_timeout option to restore the 4.1 2006-12-19 16:57:51 -07:00
innodb_trx_weight.inc Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. 2007-07-10 05:37:43 -06:00
loaddata_autocom.inc Post-merge fixes: 2006-09-13 15:37:35 -06:00
master-slave-end.inc
master-slave-reset.inc
master-slave.inc Merge pilot.(none):/data/msvensson/mysql/mysql-5.0-maint 2007-06-07 20:27:19 +02:00
mix1.inc Merge lambda.weblab:/home/malff/TREE/mysql-5.1-base 2007-10-29 08:07:27 -06:00
mix2.inc Bug #28842 Different 'duplicate key' error code between 5.0 and 5.1 2007-06-06 10:57:07 -07:00
mix2_ucs2.inc 5.1-specific fix for bug #18743. 2007-02-19 15:31:55 +03:00
mysqltest-x.inc
ndb_backup.inc Bug#26899 ndb_restore cannot restore selected tables and databases 2007-03-07 13:19:37 +07:00
ndb_backup_print.inc Bug#26899 ndb_restore cannot restore selected tables and databases 2007-03-07 13:19:37 +07:00
ndb_default_cluster.inc Bug #20820 auto inc table not handled correctly when restored from cluster backup 2006-07-06 18:50:44 +02:00
ndb_master-slave.inc correct include file 2007-09-05 18:02:46 +02:00
ndb_not_readonly.inc corrected typo 2007-06-19 11:38:07 +02:00
ndb_restore_master.inc
ndb_restore_slave_eoption.inc
ndb_setup_slave.inc Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema 2006-12-01 15:49:07 +01:00
not_as_root.inc
not_embedded.inc Small fixes for merge. 2007-04-10 18:01:29 +03:00
not_ndb.inc
not_ndb_default.inc Update 'abort_not_supported_test' to print a reason why the test was aborted 2006-07-19 14:25:52 +02:00
not_openssl.inc
not_valgrind.inc WL#3337 (Events new architecture) 2006-07-17 16:52:45 +02:00
not_windows.inc Update 'abort_not_supported_test' to print a reason why the test was aborted 2006-07-19 14:25:52 +02:00
one_thread_per_connection.inc Fixed compiler warnings 2007-02-23 13:13:55 +02:00
parser_bug21114.inc Bug#21114 (Foreign key creation fails to table with name format) 2006-11-02 11:01:53 -07:00
partition_1.inc
partition_10.inc
partition_11.inc
partition_12.inc
partition_layout.inc Fixes for the following bugs: 2007-08-27 14:08:32 -06:00
ps_conv.inc Bug#27590: Wrong DATE/DATETIME comparison. 2007-04-27 00:12:09 +04:00
ps_create.inc
ps_modify.inc Bug #28842 Different 'duplicate key' error code between 5.0 and 5.1 2007-06-06 10:57:07 -07:00
ps_modify1.inc
ps_query.inc Update mysqltest to latest version 2006-10-03 15:33:44 +02:00
ps_renew.inc
query_cache.inc Bug #28842 Different 'duplicate key' error code between 5.0 and 5.1 2007-06-06 10:57:07 -07:00
query_cache_sql_prepare.inc Fix for BUG#25843: changing default database between PREPARE and EXECUTE 2007-08-31 20:42:14 +04:00
read_many_rows.inc Merge 50 -> 51 (-opt changesets) 2007-08-01 18:59:41 -06:00
report-features.test add --report-features to mysql-test-run.pl 2006-11-10 13:12:08 +01:00
rowid_order.inc This changeset belongs to 2006-08-16 19:29:49 +02:00
rpl_events.inc rpl_packet.test: 2007-08-09 23:18:44 +02:00
rpl_multi_engine.inc
rpl_multi_engine2.inc BUG#21842 (Cluster fails to replicate to innodb or myisam with err 134 2007-08-26 14:31:10 +02:00
rpl_multi_engine3.inc Removing sleeps; rpl_row_basic_8partition falls from 2 minutes 2006-09-07 18:01:42 +02:00
rpl_stmt_seq.inc Bug#18946 Test case rpl_ndb_ddl disabled 2007-03-06 18:15:31 +01:00
rpl_udf.inc Added ORDER BY to udf select so that results are ordered. 2007-08-29 14:36:08 -07:00
safe_set_to_maybe_ro_var.inc Bug#22067 rpl_rbr_to_sbr and some other fail if NDB is default storage 2006-09-15 17:25:13 +03:00
select_ndb_apply_status.inc select_ndb_apply_status.inc: 2007-06-21 23:29:14 +02:00
show_binlog_events.inc Bug#28369 rpl test cases fail with binlog disabled 2007-06-08 11:30:03 +02:00
show_binlog_events2.inc revert back to old show_binlog_events asto many test failures, and create a show_binlog_events2 instead 2007-04-18 23:08:56 +02:00
show_binlog_using_logname.inc Many files: 2007-06-21 21:58:59 +02:00
show_msg.inc Update mysqltest to latest version 2006-10-03 15:33:44 +02:00
show_msg80.inc Update mysqltest to latest version 2006-10-03 15:33:44 +02:00
show_slave_status.inc BUG#24954 (Last_errno and Last_error not set after master_retry_count has 2007-06-11 22:15:39 +02:00
sp-vars.inc Remove compiler warnings 2006-11-20 22:42:06 +02:00
strict_autoinc.inc Bug#18908: ERROR 1406 (22001): Data too long for column :: using utf8 2006-10-30 10:14:03 +04:00
system_db_struct.inc WL #3031 2006-12-11 11:44:03 -05:00
test_fieldsize.inc BUG#22086 : Extra Slave Col: Char(5) on slave and Char(10) on master cause mysqld crash 2007-08-10 12:48:01 -04:00
test_outfile.inc
testdb_only.inc
tpcb.inc Many files: 2007-06-21 21:58:59 +02:00
tpcb_disk_data.inc Many files: 2007-06-21 21:58:59 +02:00
unsafe_binlog.inc Bug #28757 Test program / embedded server crash in test "unsafe_binlog_innodb" 2007-06-12 17:53:16 +05:00
uses_vardir.inc Bug#28718 Running backup testcase fails in mysql testsuite of MySQL-enterprise-5.0.40 2007-06-07 23:18:19 +02:00
varchar.inc Bug #28842 Different 'duplicate key' error code between 5.0 and 5.1 2007-06-06 10:57:07 -07:00
wait_condition.inc Bug #29307: status.test fails with different Table_locks_immediate 2007-08-17 19:29:08 -06:00
wait_for_query_to_suceed.inc Bug#18654 Test is timing-dependent and fails from scheduling effects (?) 2006-10-30 14:42:28 +01:00
wait_for_slave_io_to_stop.inc Fix for bug #28772: rpl_row_until fails in pushbuild 2007-06-19 16:06:11 +05:00
wait_for_slave_param.inc Fix for bug #28144: "Slave_IO_Running" differs in replication tests 2007-06-15 16:09:28 +05:00
wait_for_slave_sql_to_stop.inc Fix for bug #28772: rpl_row_until fails in pushbuild 2007-06-19 16:06:11 +05:00
wait_for_slave_to_start.inc Fix for bug #28772: rpl_row_until fails in pushbuild 2007-06-19 16:06:11 +05:00
wait_for_slave_to_stop.inc WL#3228 (RBR using different table defs on slave/master): 2007-07-30 13:32:15 +02:00
wait_show_pattern.inc Fix for bug #25044 "ALTER TABLE ... ENABLE KEYS acquires global 'opening 2007-01-19 23:15:59 +03:00
wait_slave_status.inc Fix for bug #25044 "ALTER TABLE ... ENABLE KEYS acquires global 'opening 2007-01-19 23:15:59 +03:00
wait_until_connected_again.inc Increase time to wait for mysqld to get restarted(it will take some time when running in valgrind) 2006-09-28 11:53:42 +02:00
wait_until_rows_count.inc BUG#25211: events_bugs.test fails on sapsrv1 2007-01-19 18:33:48 +03:00
windows.inc Add test for named pipes on windows 2007-09-24 12:42:44 +02:00