| 1 |
# ==== Purpose ==== |
| 2 |
# |
| 3 |
# Verify that their is no crash any more while executing a |
| 4 |
# 'CREATE...SELECT' statement even if it is interrupted at |
| 5 |
# debug point 'mysql_lock_tables_kill_query' in the middle |
| 6 |
# and 'CREATE TABLE' event was not logged when |
| 7 |
# binlog_format='row', gtid_mode=off and autocommit=0. |
| 8 |
# |
| 9 |
# ==== Implementation ==== |
| 10 |
# |
| 11 |
# 1. Disable autocommit. |
| 12 |
# 2. Create a table with select. |
| 13 |
# 3. Drop the table from another connection. |
| 14 |
# 4. Set DEBUG= '+d,mysql_lock_tables_kill_query'. |
| 15 |
# 5. There is no crash while executing a 'CREATE ... SELECT' |
| 16 |
# statement even if it is interrupted at the above debug |
| 17 |
# point in the middle. |
| 18 |
# 6. Verify that 'CREATE TABLE' event was not logged. |
| 19 |
# |
| 20 |
# ==== References ==== |
| 21 |
# |
| 22 |
# Bug#21114464 CRASHES WITH CONCURRENT DDL+KILL+BIN LOGGING |
| 23 |
|
| 24 |
--source include/have_binlog_format_row.inc |
| 25 |
--source include/have_debug.inc |
| 26 |
|
| 27 |
--connection default |
| 28 |
SET SESSION autocommit= 0; |
| 29 |
CREATE TABLE t1 AS SELECT 1 AS col1; |
| 30 |
|
| 31 |
--connect(con1,localhost,root) |
| 32 |
--connection con1 |
| 33 |
DROP TABLE t1; |
| 34 |
|
| 35 |
--connection default |
| 36 |
RESET MASTER; |
| 37 |
SET SESSION DEBUG= '+d,mysql_lock_tables_kill_query'; |
| 38 |
--error ER_QUERY_INTERRUPTED |
| 39 |
CREATE TABLE t2 AS SELECT 1 AS col1; |
| 40 |
SET SESSION DEBUG= '-d,mysql_lock_tables_kill_query'; |
| 41 |
|
| 42 |
--echo # Verify that 'CREATE TABLE t2' event was not logged. |
| 43 |
--source include/show_binlog_events.inc |
| 44 |
|
| 45 |
SET SESSION autocommit= 1; |