mariadb/mysql-test/include
Jon Olav Hauglid 3eead1f0f1 Bug #51355 handler stmt cause assertion in
bool MDL_context::try_acquire_lock(MDL_request*)

This assert was triggered in the following way:
1) HANDLER OPEN t1 from connection 1
2) DROP TABLE t1 from connection 2. This will block due to the metadata lock
held by the open handler in connection 1.
3) DML statement (e.g. INSERT) from connection 1. This will close the table
opened by the HANDLER in 1) and release its metadata lock. This is done due
to the pending exclusive metadata lock from 2). 
4) DROP TABLE t1 from connection 2 now completes and removes table t1.
5) HANDLER READ from connection 1. Since the handler table was closed in 3),
the handler code will try to reopen the table. First a new metadata lock on
t1 will be granted before the command fails since the table was removed in 4).
6) HANDLER READ from connection 1. This caused the assert.

The reason for the assert was that the MDL_request's pointer to the lock
ticket was not reset when the statement failed. HANDLER READ then tried to
acquire a lock using the same MDL_request object, triggering the assert.
This bug was only noticeable on debug builds and did not cause any problems
on release builds.

This patch fixes the problem by assuring that the pointer to the metadata 
lock ticket is reset when reopening of handler tables fails.

Test case added to handler.inc
2010-02-25 18:08:12 +01:00
..
add_anonymous_users.inc
analyze-sync_with_master.test Bug #38181 Please print more debug info when tests fail 2008-08-04 21:54:44 +02:00
analyze-timeout.test WL#4350 Add missing 'exit' 2008-09-09 09:49:58 +02:00
big_test.inc
binlog_inject_error.inc Merge next-mr -> next-4284. 2010-02-04 23:15:47 +03:00
bug38347.inc Backporting patches for Bug#38347 (ALTER ROUTINE privilege 2009-10-22 16:51:51 +04:00
check-testcase.test Merge 5.0->5.1 2008-11-24 16:56:48 -05:00
check-warnings.test BUG#47612 - fix review comment 2009-10-07 16:25:36 +02:00
check_events_off.inc 1. Fix for Bug#41111 events_bugs fails sporadically on pushbuild 2009-01-09 15:10:03 +01:00
check_ipv6.inc Reviewed patch of QA results for WL#798. 2009-11-23 17:38:42 +01:00
check_key_reads.inc Bug#49369: No testcase for key caches on partitions 2009-12-03 13:31:56 +01:00
check_key_req.inc Bug#49369: No testcase for key caches on partitions 2009-12-03 13:31:56 +01:00
check_var_limit.inc
circular_rpl_for_4_hosts_init.inc WL#3754, circular replication tests 2008-04-25 20:54:42 +04:00
circular_rpl_for_4_hosts_sync.inc WL#3754, testing circular replication 2008-04-25 00:41:04 +04:00
cleanup_fake_relay_log.inc Bug#48308. Post-fix 2010-02-19 22:37:23 +03:00
commit.inc Merge next-mr -> next-4284. 2010-02-05 01:08:08 +03:00
common-tests.inc
concurrent.inc Bug#43733 Select on processlist let the embedded server crash (concurrent_innodb_safelog) 2009-06-04 23:36:34 +05:00
connect2.inc
count_sessions.inc 1. Slice of fix for Bug#42003 tests missing the disconnect of connections <> default 2009-02-02 22:20:25 +01:00
ctype_common.inc
ctype_filesort.inc
ctype_german.inc
ctype_innodb_like.inc
ctype_like_escape.inc
ctype_like_range_f1f2.inc
ctype_regex.inc
ctype_utf8_table.inc WL#3090 Japanese Character Set adjustments 2010-02-15 09:57:24 +04:00
ddl_i18n.check_events.inc
ddl_i18n.check_sp.inc backported: 2010-01-15 15:42:15 +04:00
ddl_i18n.check_triggers.inc
ddl_i18n.check_views.inc
deadlock.inc
default_client.cnf WL#1349 Use operating system localization to send it as a default client character set 2009-10-21 17:59:47 +05:00
default_my.cnf WL#2360 Performance schema 2010-01-11 18:47:27 -07:00
default_mysqld.cnf WL#5154 Remove deprecated 4.1 features 2010-02-17 10:18:17 +01:00
default_ndbd.cnf Bug#39849 ndb tests fail sporadically on pushbuild: "out of connection objects" 2009-01-29 15:22:02 +01:00
delete_anonymous_users.inc
diff_master_slave.inc BUG#37145 Killing a statement doing DDL may log binlog event with error code 1053 2009-03-27 13:19:50 +08:00
diff_tables.inc WL#4738 streamline/simplify @@variable creation process 2009-12-22 10:35:56 +01:00
endspace.inc
get_binlog_dump_thread_id.inc
gis_generic.inc
gis_keys.inc
grant_cache.inc Fix for Bug#42308 Several server tests do not pass MTR's --check option 2009-05-15 12:15:56 +02:00
handler.inc Bug #51355 handler stmt cause assertion in 2010-02-25 18:08:12 +01:00
have_32bit.inc Patch for bug#36875: Inserted review results. 2009-01-08 19:13:57 +01:00
have_64bit.inc Patch for bug#36875: Inserted review results. 2009-01-08 19:13:57 +01:00
have_archive.inc Bug#30563: Is not possible to create rpl_ or innodb test if needed \ 2008-07-04 12:41:27 -04:00
have_big5.inc Bug#30563: Is not possible to create rpl_ or innodb test if needed \ 2008-07-04 12:41:27 -04:00
have_binlog_format_mixed.inc Merge from 5.0. Add new 5.1 files. Drop bdb. 2008-07-04 14:48:25 -04:00
have_binlog_format_mixed_or_row.inc Merge from 5.0. Add new 5.1 files. Drop bdb. 2008-07-04 14:48:25 -04:00
have_binlog_format_mixed_or_statement.inc Merge from 5.0. Add new 5.1 files. Drop bdb. 2008-07-04 14:48:25 -04:00
have_binlog_format_row.inc Merge from 5.0. Add new 5.1 files. Drop bdb. 2008-07-04 14:48:25 -04:00
have_binlog_format_row_or_statement.inc Merge from 5.0. Add new 5.1 files. Drop bdb. 2008-07-04 14:48:25 -04:00
have_binlog_format_statement.inc Merge from 5.0. Add new 5.1 files. Drop bdb. 2008-07-04 14:48:25 -04:00
have_blackhole.inc Bug#30563: Is not possible to create rpl_ or innodb test if needed \ 2008-07-04 12:41:27 -04:00
have_case_insensitive_file_system.inc Bug#37402: Mysql cant read partitioned table with capital letter in the name 2008-07-11 01:14:13 +02:00
have_case_insensitive_fs.inc Bug#41049 does syntax "grant" case insensitive? 2009-10-27 12:09:19 +04:00
have_case_sensitive_file_system.inc Bug#30563: Is not possible to create rpl_ or innodb test if needed \ 2008-07-04 12:41:27 -04:00
have_compress.inc Bug#30563: Is not possible to create rpl_ or innodb test if needed \ 2008-07-04 12:41:27 -04:00
have_cp866.inc
have_cp932.inc Bug#30563: Is not possible to create rpl_ or innodb test if needed \ 2008-07-04 12:41:27 -04:00
have_cp1250_ch.inc Bug#30563: Is not possible to create rpl_ or innodb test if needed \ 2008-07-04 12:41:27 -04:00
have_cp1251.inc
have_crypt.inc Bug#30563: Is not possible to create rpl_ or innodb test if needed \ 2008-07-04 12:41:27 -04:00
have_csv.inc Bug#30563: Is not possible to create rpl_ or innodb test if needed \ 2008-07-04 12:41:27 -04:00
have_debug.inc Merge from 5.0. Add new 5.1 files. Drop bdb. 2008-07-04 14:48:25 -04:00
have_debug_sync.inc WL#4259 - Debug Sync Facility 2009-09-29 17:38:40 +02:00
have_dynamic_loading.inc merging 5.1 main -> 5.1-rep+2 -> 5.1-rep+3; binlog_unsafe , rpl_mysql_upgrade fail and are under treatment 2009-11-10 20:45:15 +02:00
have_eucjpms.inc Bug#30563: Is not possible to create rpl_ or innodb test if needed \ 2008-07-04 12:41:27 -04:00
have_euckr.inc Bug#30563: Is not possible to create rpl_ or innodb test if needed \ 2008-07-04 12:41:27 -04:00
have_example_plugin.inc merged fixes for BUG#39934 to 5.1-rpl+3 2009-09-30 18:00:22 +02:00
have_exampledb.inc Bug#30563: Is not possible to create rpl_ or innodb test if needed \ 2008-07-04 12:41:27 -04:00
have_gb2312.inc Bug#30563: Is not possible to create rpl_ or innodb test if needed \ 2008-07-04 12:41:27 -04:00
have_gbk.inc Bug#30563: Is not possible to create rpl_ or innodb test if needed \ 2008-07-04 12:41:27 -04:00
have_geometry.inc Bug#30563: Is not possible to create rpl_ or innodb test if needed \ 2008-07-04 12:41:27 -04:00
have_innodb.inc Bug#30563: Is not possible to create rpl_ or innodb test if needed \ 2008-07-04 12:41:27 -04:00
have_ipv4_mapped.inc New patch for bug#49579, now with "have_ipv4_mapped.inc". 2010-01-29 11:48:11 +01:00
have_koi8r.inc
have_latin2_ch.inc Bug#30563: Is not possible to create rpl_ or innodb test if needed \ 2008-07-04 12:41:27 -04:00
have_local_infile.inc
have_log_bin.inc merged 5.1 main to 5.1-rpl 2008-08-04 07:04:47 +02:00
have_lowercase0.inc Bug#37402: Mysql cant read partitioned table with capital letter in the name 2008-07-11 01:14:13 +02:00
have_lowercase1.inc
have_lowercase2.inc Bug#37402: Mysql cant read partitioned table with capital letter in the name 2008-07-11 01:14:13 +02:00
have_multi_ndb.inc Bug#30563: Is not possible to create rpl_ or innodb test if needed \ 2008-07-04 12:41:27 -04:00
have_mysql_upgrade.inc BUG#43579 mysql_upgrade tries to alter log tables on replicated database 2009-09-28 14:24:19 +08:00
have_ndb.inc Bug#30563: Is not possible to create rpl_ or innodb test if needed \ 2008-07-04 12:41:27 -04:00
have_ndb_extra.inc
have_ndbapi_examples.inc merged 5.1 main to 5.1-rpl 2008-08-04 07:04:47 +02:00
have_nodebug.inc Bug#33637 SHOW PROCEDURE CODE/SHOW FUNCTION CODE sp_name gives a syntax error. 2009-10-29 10:51:04 -06:00
have_not_innodb_plugin.inc Bug#32430: 'show innodb status' causes errors 2009-09-25 11:26:49 +02:00
have_outfile.inc Merge from 5.0. Add new 5.1 files. Drop bdb. 2008-07-04 14:48:25 -04:00
have_partition.inc Merge from 5.0. Add new 5.1 files. Drop bdb. 2008-07-04 14:48:25 -04:00
have_perfschema.inc WL#2360 Performance schema 2010-01-06 22:42:07 -07:00
have_profiling.inc Bug #44651 "have_community_features" variable should be renamed 2009-10-09 15:59:25 +02:00
have_query_cache.inc Merge from 5.0. Add new 5.1 files. Drop bdb. 2008-07-04 14:48:25 -04:00
have_semisync_plugin.inc Auto merge from 5.1-rep+2 2009-10-29 15:14:50 +08:00
have_simple_parser.inc merged fixes for BUG#39934 to 5.1-rpl+3 2009-09-30 18:00:22 +02:00
have_sjis.inc Bug#30563: Is not possible to create rpl_ or innodb test if needed \ 2008-07-04 12:41:27 -04:00
have_ssl.inc Bug#30563: Is not possible to create rpl_ or innodb test if needed \ 2008-07-04 12:41:27 -04:00
have_ssl_communication.inc WL#4641 Heartbeat testing 2009-10-02 23:24:40 +04:00
have_symlink.inc Merge from 5.0. Add new 5.1 files. Drop bdb. 2008-07-04 14:48:25 -04:00
have_thread_concurrency.inc WL#4738 streamline/simplify @@variable creation process 2009-12-22 10:35:56 +01:00
have_tis620.inc Bug#30563: Is not possible to create rpl_ or innodb test if needed \ 2008-07-04 12:41:27 -04:00
have_ucs2.inc Bug#30563: Is not possible to create rpl_ or innodb test if needed \ 2008-07-04 12:41:27 -04:00
have_udf.inc merged fixes for BUG#39934 to 5.1-rpl+3 2009-09-30 18:00:22 +02:00
have_ujis.inc Bug#30563: Is not possible to create rpl_ or innodb test if needed \ 2008-07-04 12:41:27 -04:00
have_utf8.inc
implicit_commit_helper.inc Backport of: 2009-12-03 18:47:20 +03:00
index_merge1.inc WL#4738 streamline/simplify @@variable creation process 2009-12-22 10:35:56 +01:00
index_merge2.inc fix for Bug#46897 'Test "index_merge_innodb" fails (mostly)': 2009-08-25 17:53:43 +02:00
index_merge_2sweeps.inc
index_merge_ror.inc
index_merge_ror_cpk.inc
innodb_rollback_on_timeout.inc
innodb_trx_weight.inc
ipv6.inc Patch to fix bug#50981. Replace now the result ::1 by localhost for Windows. Both is valid. 2010-02-08 11:43:56 +01:00
ipv6_clients.inc Reviewed patch of QA results for WL#798. 2009-11-23 17:38:42 +01:00
is_embedded.inc Bug#35997 Event scheduler seems to let the server crash, if it is embedded. 2008-05-09 10:26:06 +02:00
kill_query.inc Post fix for bug#45520 2009-12-10 11:44:19 +08:00
kill_query_and_diff_master_slave.inc BUG#37145 Killing a statement doing DDL may log binlog event with error code 1053 2009-03-27 13:19:50 +08:00
linux_sys_vars.inc Fix for Bug#36876: 2008-12-02 11:05:56 +01:00
load_sysvars.inc Fixes for bug#36522. 2008-05-08 20:13:39 +02:00
loaddata_autocom.inc
master-slave-end.inc BUG#37051 Replication rules not evaluated correctly 2009-03-05 18:10:44 +08:00
master-slave-reset.inc BUG#48048: Deprecated constructs need removal in Betony 2009-11-04 12:28:20 +00:00
master-slave.inc BUG#48048: Deprecated constructs need removal in Betony 2009-11-04 12:28:20 +00:00
mix1.inc Backport of: 2009-12-08 10:39:49 +03:00
mix2.inc Backport of revno ## 2617.31.1, 2617.31.3, 2617.31.4, 2617.31.5, 2009-12-05 02:02:48 +03:00
mix2_ucs2.inc
mtr_check.sql Bug#43983 Support force restart of all servers after test ended 2009-03-31 15:39:40 +02:00
mtr_warnings.sql Add ignore pattern for valgrind messages. 2010-02-23 16:18:24 +03:00
mysqlbinlog_row_engine.inc Postfix of tests after merge 2008-09-06 12:49:43 +08:00
mysqld--help.inc Fixed typos and failed mysqld--help test. 2010-01-26 22:05:41 +01:00
mysqldump.inc Bug#40465 - mysqldump.test does no checking of dump or restore 2009-05-22 10:38:17 -04:00
mysqltest-x.inc Bug #38181 Please print more debug info when tests fail 2008-08-04 21:54:44 +02:00
ndb_backup.inc merge 5.0 -> 5.1 2009-03-15 18:39:48 -04:00
ndb_backup_print.inc Bug#38311 Some tests use 'rm' which is not portable 2008-09-20 02:21:28 -04:00
ndb_default_cluster.inc
ndb_master-slave.inc
ndb_master-slave_2ch.inc WL#3754, testing circular replication 2008-04-25 00:41:04 +04:00
ndb_not_readonly.inc
ndb_restore_master.inc
ndb_restore_slave_eoption.inc
ndb_setup_slave.inc
ndb_wait_connected.inc
no_running_event_scheduler.inc 1. Fix for Bug#41111 events_bugs fails sporadically on pushbuild 2009-01-09 15:10:03 +01:00
no_running_events.inc 1. Fix for Bug#41111 events_bugs fails sporadically on pushbuild 2009-01-09 15:10:03 +01:00
no_valgrind_without_big.inc Don't run funcs_1/myisam_views test case under valgrind, unless 2009-06-09 11:36:14 -03:00
not_as_root.inc Bug #32307 mysqltest - does not detect illegal if syntax 2008-08-04 12:38:50 +02:00
not_embedded.inc
not_ndb.inc
not_ndb_default.inc BUG#48048: Deprecated constructs need removal in Betony 2009-11-04 12:28:20 +00:00
not_openssl.inc
not_valgrind.inc
not_windows.inc
not_windows_embedded.inc Bug#47801 The plugin test fails with the Embedded Server on Windows 2009-10-08 10:39:15 +02:00
one_thread_per_connection.inc
parser_bug21114.inc
partition_date_range.inc post push fix for bug#20577 and bug#46362, disabling warnings 2009-09-01 14:53:27 +02:00
ps_conv.inc
ps_create.inc
ps_ddl_1.inc Improve the testcases for Bug 12093 in ps_ddl.test 2008-08-13 21:42:21 +02:00
ps_modify.inc Bug #39265: fix for the bug 33699 should be reverted 2009-02-05 13:49:32 +04:00
ps_modify1.inc
ps_query.inc
ps_renew.inc
query_cache.inc WL#4738 streamline/simplify @@variable creation process 2009-12-22 10:35:56 +01:00
query_cache_sql_prepare.inc WL#4738 streamline/simplify @@variable creation process 2009-12-22 10:35:56 +01:00
read_many_rows.inc
report-features.test Change typo . -> , 2008-09-20 17:00:05 +03:00
reset_master_and_slave.inc BUG#37975: wait_for_slave_* should increase the timeout 2008-07-10 18:09:39 +02:00
restart_mysqld.inc BUG#40704 main.events_restart fails sporadically in pushbuild: "server has gone away" 2008-12-25 17:53:24 +08:00
rowid_order.inc
rpl_events.inc Bug#30128: The reason that sometimes events were executed because without STARTS 2009-01-21 18:48:12 +03:00
rpl_ip_mix.inc No more socket and no more diffs in result files. 2009-11-27 09:02:32 +01:00
rpl_ip_mix2.inc No more socket and no more diffs in result files. 2009-11-27 09:02:32 +01:00
rpl_ipv6.inc Improvements to reduce the output for better reading and more stability. 2009-11-26 09:03:04 +01:00
rpl_loaddata_charset.inc Manual Merge 2009-08-12 13:31:56 +08:00
rpl_multi_engine.inc BUG#40707 rpl_multi_engine fails sporadically in pushbuild 2008-11-24 14:57:23 +08:00
rpl_multi_engine2.inc
rpl_multi_engine3.inc
rpl_stmt_seq.inc
rpl_udf.inc BUG#39934: Slave stops for engine that only support row-based logging 2009-07-14 21:31:19 +02:00
running_event_scheduler.inc 1. Fix for Bug#41111 events_bugs fails sporadically on pushbuild 2009-01-09 15:10:03 +01:00
safe_set_to_maybe_ro_var.inc
select_ndb_apply_status.inc
set_binlog_format_mixed.sql
set_binlog_format_row.sql
set_binlog_format_statement.sql
setup_fake_relay_log.inc Bug#48308. 2010-02-16 22:34:34 +03:00
show_binary_logs.inc
show_binlog_events.inc merge from 5.1-rpl+2 repo to a local branch with HB and bug@27808 fixes 2009-10-01 20:22:44 +03:00
show_binlog_events2.inc WL#342 heartbeat 2009-09-29 14:16:23 +03:00
show_binlog_using_logname.inc
show_master_logs.inc
show_master_status.inc
show_msg.inc
show_msg80.inc
show_relaylog_events.inc BUG#28777, WL#4293: SHOW BINLOG EVENTS does not work on relay log 2009-09-29 00:04:20 +01:00
show_rpl_debug_info.inc BUG#37718: rpl.rpl_stm_mystery22 fails sporadically on pushbuild 2009-01-09 15:12:31 +01:00
show_slave_status.inc
show_slave_status2.inc WL#4738 streamline/simplify @@variable creation process 2009-12-22 10:35:56 +01:00
sp-vars.inc
start_slave.inc BUG#37051 Replication rules not evaluated correctly 2009-03-05 18:10:44 +08:00
stop_slave.inc BUG#37051 Replication rules not evaluated correctly 2009-03-05 18:10:44 +08:00
strict_autoinc.inc
sync_slave_io_with_master.inc BUG#37718: rpl.rpl_stm_mystery22 fails sporadically on pushbuild 2009-01-09 15:12:31 +01:00
system_db_struct.inc
test_fieldsize.inc Bug #30703 SHOW STATUS LIKE 'Slave_running' is not compatible with `SHOW SLAVE 2009-09-29 15:10:37 +01:00
test_outfile.inc
testdb_only.inc
tpcb.inc
tpcb_disk_data.inc
truncate_file.inc BUG #28421 Infinite loop on slave relay logs 2010-01-08 13:42:23 +08:00
unsafe_binlog.inc
uses_vardir.inc
varchar.inc
wait_condition.inc Fix for 2008-06-25 16:59:38 +02:00
wait_condition_sp.inc Final fix for bug#36773: Moved patch in 5.1 from rpl to bug team tree. 2008-12-17 14:38:02 +01:00
wait_for_binlog_event.inc
wait_for_ndb_to_binlog.inc Backport for WL#4416 2009-11-27 02:32:01 +03:00
wait_for_query_to_succeed.inc Reviewed fix for bug#40882: Replaced "sleep 1" by wait_condition, added save/restore start values and closed open sessions. When trying to use "wait_for_query_to_succeed" a type has been fixed, also in "rename.test": Added session count and check and replaced error numbers. 2009-02-11 10:27:52 +01:00
wait_for_slave_io_error.inc BUG#44270: Post-push fix 2009-06-26 12:05:56 +01:00
wait_for_slave_io_to_start.inc BUG#37718: rpl.rpl_stm_mystery22 fails sporadically on pushbuild 2009-01-09 15:12:31 +01:00
wait_for_slave_io_to_stop.inc BUG#37718: rpl.rpl_stm_mystery22 fails sporadically on pushbuild 2009-01-09 15:12:31 +01:00
wait_for_slave_param.inc Bug#37267 - connect() EINPROGRESS failures mishandled in client library 2009-09-30 12:28:15 +02:00
wait_for_slave_sql_error.inc BUG#37051 Replication rules not evaluated correctly 2009-03-05 18:10:44 +08:00
wait_for_slave_sql_error_and_skip.inc BUG#37051 Replication rules not evaluated correctly 2009-03-05 18:10:44 +08:00
wait_for_slave_sql_to_start.inc BUG#37718: rpl.rpl_stm_mystery22 fails sporadically on pushbuild 2009-01-09 15:12:31 +01:00
wait_for_slave_sql_to_stop.inc BUG#37718: rpl.rpl_stm_mystery22 fails sporadically on pushbuild 2009-01-09 15:12:31 +01:00
wait_for_slave_to_start.inc BUG#37718: rpl.rpl_stm_mystery22 fails sporadically on pushbuild 2009-01-09 15:12:31 +01:00
wait_for_slave_to_stop.inc BUG#37718: rpl.rpl_stm_mystery22 fails sporadically on pushbuild 2009-01-09 15:12:31 +01:00
wait_for_status_var.inc Bug#37716. 2009-04-04 01:33:13 +04:00
wait_show_condition.inc Bug#13963 SHOW SLAVE HOSTS is unreliable 2009-10-20 14:30:15 +08:00
wait_until_connected_again.inc push to 5.1-buteam tree. 2008-12-10 10:51:43 +00:00
wait_until_count_sessions.inc Merge 5.0 -> 5.1 of fix for Bug#42003 and Bug#43114 2009-03-06 15:56:17 +01:00
wait_until_disconnected.inc Partial backport for BUG#41399, more precisely, the changes to 2009-10-01 00:32:15 +01:00
wait_until_rows_count.inc
windows.inc
windows_sys_vars.inc Fix for Bug#36876: 2008-12-02 11:05:56 +01:00