| 1 |
connection node_2; |
| 2 |
connection node_1; |
| 3 |
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; |
| 4 |
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1; |
| 5 |
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; |
| 6 |
connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2; |
| 7 |
connection node_1; |
| 8 |
SET DEBUG_SYNC = 'wsrep_create_table_as_select WAIT_FOR continue'; |
| 9 |
CREATE table t1 as SELECT SLEEP(0.1);; |
| 10 |
connection node_1a; |
| 11 |
# Wait until CTAS is on debug sync point |
| 12 |
connection node_1b; |
| 13 |
SET SESSION wsrep_sync_wait = 0; |
| 14 |
SET GLOBAL debug_dbug = '+d,sync.wsrep_apply_cb'; |
| 15 |
connection node_2; |
| 16 |
CREATE table t1 as SELECT SLEEP(0.2);; |
| 17 |
connection node_1b; |
| 18 |
SET SESSION debug_sync = 'now WAIT_FOR sync.wsrep_apply_cb_reached'; |
| 19 |
# Signal first CTAS to continue and wait until CTAS has executed |
| 20 |
SET DEBUG_SYNC= 'now SIGNAL continue'; |
| 21 |
connection node_2b; |
| 22 |
# Wait first CTAS to replicate |
| 23 |
SELECT * FROM t1; |
| 24 |
SLEEP(0.2) |
| 25 |
0 |
| 26 |
connection node_1b; |
| 27 |
SET GLOBAL debug_dbug= ''; |
| 28 |
SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb'; |
| 29 |
connection node_2a; |
| 30 |
connection node_1b; |
| 31 |
SET DEBUG_SYNC= 'RESET'; |
| 32 |
connection node_2; |
| 33 |
SELECT * FROM t1; |
| 34 |
SLEEP(0.2) |
| 35 |
0 |
| 36 |
connection node_1; |
| 37 |
SELECT * FROM t1; |
| 38 |
SLEEP(0.2) |
| 39 |
0 |
| 40 |
DROP TABLE t1; |
| 41 |
disconnect node_1a; |
| 42 |
disconnect node_1b; |
| 43 |
disconnect node_2a; |
| 44 |
disconnect node_2b; |
| 45 |
disconnect node_2; |
| 46 |
disconnect node_1; |
| 47 |
# End of test |