| 1 |
# ==== Purpose ==== |
| 2 |
# The purpose of this test is to make sure binlog file is re-stored |
| 3 |
# when client session running RESET MASTER is killed. |
| 4 |
# |
| 5 |
# ==== Requirements ==== |
| 6 |
# RESET MASTER should exit leaving binlog files in consistent state. |
| 7 |
# |
| 8 |
# ==== Implementation ==== |
| 9 |
# 1. Create table t1 |
| 10 |
# 2. Run RESET MASTER from client connection master_tmp |
| 11 |
# 3. Kill the master_tmp connection |
| 12 |
# 4. Now DROP TABLE t1(any DDL) |
| 13 |
# |
| 14 |
# ==== References ==== |
| 15 |
# Bug#29125121: ASSERTION `M_PIPELINE_HEAD != __NULL' IN MYSQL_BIN_LOG::BINLOG_OFILE::WRITE |
| 16 |
|
| 17 |
# 1. Create table t1 |
| 18 |
--source include/have_debug_sync.inc |
| 19 |
|
| 20 |
--let $debug_point= wait_for_kill_gtid_state_clear |
| 21 |
--source include/add_debug_point.inc |
| 22 |
|
| 23 |
CALL mtr.add_suppression('The transaction owned GTID is already in the gtid_executed table, which is caused by an explicit modifying from user client.'); |
| 24 |
CREATE TABLE t1(c1 int); |
| 25 |
|
| 26 |
--connect(master_tmp,127.0.0.1,root,,test,$MASTER_MYPORT,) |
| 27 |
--let $thread_id= `SELECT CONNECTION_ID()` |
| 28 |
|
| 29 |
# 2. Run RESET MASTER from client connection master_tmp |
| 30 |
--send RESET MASTER |
| 31 |
|
| 32 |
# 3. Kill the master_tmp connection |
| 33 |
--connection default |
| 34 |
--disable_query_log |
| 35 |
--eval KILL $thread_id |
| 36 |
SET DEBUG_SYNC='now SIGNAL kill_gtid_state_clear'; |
| 37 |
--enable_query_log |
| 38 |
|
| 39 |
--connection master_tmp |
| 40 |
--error CR_SERVER_LOST |
| 41 |
--reap |
| 42 |
|
| 43 |
# 4. Now DROP TABLE t1(any DDL) |
| 44 |
--connection default |
| 45 |
DROP TABLE t1; |
| 46 |
--source include/remove_debug_point.inc |
| 47 |
|
| 48 |
--disconnect master_tmp |