| 1 |
# |
| 2 |
# MDEV-25718 Assertion `transaction.is_streaming()' failed in |
| 3 |
# void wsrep::transaction::adopt() |
| 4 |
# |
| 5 |
|
| 6 |
--source include/galera_cluster.inc |
| 7 |
--source include/have_debug_sync.inc |
| 8 |
|
| 9 |
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY); |
| 10 |
|
| 11 |
# |
| 12 |
# Start a SR transaction and block it after it has replicated |
| 13 |
# a fragment. Notice the transaction is still in executing state. |
| 14 |
# |
| 15 |
--connection node_1 |
| 16 |
SET SESSION wsrep_trx_fragment_size = 1; |
| 17 |
START TRANSACTION; |
| 18 |
SET debug_sync = "ha_write_row_end SIGNAL write_row_end WAIT_FOR write_row_continue"; |
| 19 |
--send INSERT INTO t1 VALUES (1); |
| 20 |
|
| 21 |
--connect node_ctrl, 127.0.0.1, root, , test, $NODE_MYPORT_1 |
| 22 |
--connection node_ctrl |
| 23 |
SET debug_sync = "now WAIT_FOR write_row_end"; |
| 24 |
SET GLOBAL debug_dbug = '+d,wsrep_streaming_rollback'; |
| 25 |
|
| 26 |
# |
| 27 |
# Issue a conflicting DDL, that will block in streaming_rollback |
| 28 |
# sync point. |
| 29 |
# |
| 30 |
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 |
| 31 |
--connection node_1a |
| 32 |
--send TRUNCATE TABLE t1; |
| 33 |
|
| 34 |
--connection node_ctrl |
| 35 |
SET SESSION debug_sync = "now WAIT_FOR wsrep_streaming_rollback_reached"; |
| 36 |
|
| 37 |
# |
| 38 |
# Let the INSERT continue. If bug is present will be able to go through |
| 39 |
# before_rollback() / streaming_rollback() and clear its streaming context, |
| 40 |
# which causes the assertion to trigger in BF aborter. |
| 41 |
# |
| 42 |
SET SESSION wsrep_sync_wait = 0; |
| 43 |
SET debug_sync = "now SIGNAL write_row_continue"; |
| 44 |
|
| 45 |
# Let's give the INSERT some time, to make sure it does rollback |
| 46 |
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO = "INSERT INTO t1 VALUES (1)" AND (STATE = 'Freeing items' OR STATE = 'Rollback' OR STATE = 'Query end'); |
| 47 |
--let $wait_condition_on_error_output = SELECT INFO, STATE FROM INFORMATION_SCHEMA.PROCESSLIST |
| 48 |
--source include/wait_condition_with_debug.inc |
| 49 |
|
| 50 |
# Resume the DDL in streaming_rollback |
| 51 |
SET SESSION debug_sync = "now SIGNAL wsrep_streaming_rollback_continue"; |
| 52 |
|
| 53 |
--connection node_1a |
| 54 |
--reap |
| 55 |
|
| 56 |
--connection node_1 |
| 57 |
--error ER_LOCK_DEADLOCK |
| 58 |
--reap |
| 59 |
|
| 60 |
# Cleanup |
| 61 |
--connection node_ctrl |
| 62 |
SET GLOBAL debug_dbug = ""; |
| 63 |
SET DEBUG_SYNC = 'RESET'; |
| 64 |
DROP TABLE t1; |