| 1 |
--source include/galera_cluster.inc |
| 2 |
--source include/have_debug_sync.inc |
| 3 |
--source include/have_debug.inc |
| 4 |
|
| 5 |
--connect con1,127.0.0.1,root,,test,$NODE_MYPORT_1 |
| 6 |
|
| 7 |
call mtr.add_suppression("WSREP: ALTER TABLE isolation failure"); |
| 8 |
|
| 9 |
CREATE TABLE t1(c1 INT PRIMARY KEY, c2 INT) ENGINE=InnoDB; |
| 10 |
INSERT into t1 values (1,1); |
| 11 |
|
| 12 |
SET DEBUG_SYNC = 'alter_table_after_open_tables SIGNAL bf_started WAIT_FOR bf_continue'; |
| 13 |
--send ALTER TABLE t1 DROP COLUMN c2; |
| 14 |
|
| 15 |
--connection node_1 |
| 16 |
SET SESSION wsrep_sync_wait = 0; |
| 17 |
SET DEBUG_SYNC = 'now WAIT_FOR bf_started'; |
| 18 |
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'debug sync point: alter_table_after_open_tables' |
| 19 |
--source include/wait_condition.inc |
| 20 |
|
| 21 |
--let $applier_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'debug sync point:%' LIMIT 1` |
| 22 |
|
| 23 |
--replace_result $applier_thread ID |
| 24 |
--error ER_KILL_DENIED_ERROR |
| 25 |
--eval KILL $applier_thread |
| 26 |
|
| 27 |
--replace_result $applier_thread ID |
| 28 |
--error ER_KILL_DENIED_ERROR |
| 29 |
--eval KILL QUERY $applier_thread |
| 30 |
|
| 31 |
--connection node_1 |
| 32 |
SET DEBUG_SYNC = 'now SIGNAL bf_continue'; |
| 33 |
|
| 34 |
--connection con1 |
| 35 |
--reap |
| 36 |
SET DEBUG_SYNC = 'RESET'; |
| 37 |
SELECT * FROM t1; |
| 38 |
|
| 39 |
--connection node_1 |
| 40 |
DROP TABLE t1; |
| 41 |
--disconnect con1 |