|
| 1 | +# |
| 2 | +# MDEV-27615 - Assertion `server_id.is_undefined() == false' |
| 3 | +# failed in wsrep::transaction::certify_fragment() |
| 4 | +# |
| 5 | + |
| 6 | +--source include/galera_cluster.inc |
| 7 | +--source include/have_debug_sync.inc |
| 8 | + |
| 9 | +--let $node_1=node_1 |
| 10 | +--let $node_2=node_2 |
| 11 | +--source suite/galera/include/auto_increment_offset_save.inc |
| 12 | + |
| 13 | +--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2 |
| 14 | + |
| 15 | +--connection node_2 |
| 16 | +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB; |
| 17 | + |
| 18 | +# |
| 19 | +# Set debug sync point right before the assert |
| 20 | +# |
| 21 | +SET DEBUG_SYNC='wsrep_before_fragment_certification SIGNAL before_fragment WAIT_FOR continue'; |
| 22 | + |
| 23 | +SET SESSION wsrep_trx_fragment_size=1; |
| 24 | +START TRANSACTION; |
| 25 | +--send INSERT INTO t1 VALUES (1); |
| 26 | + |
| 27 | + |
| 28 | +# |
| 29 | +# Disconnect node_2 from cluster |
| 30 | +# |
| 31 | +--connection node_2a |
| 32 | +SET SESSION wsrep_sync_wait = 0; |
| 33 | +--let $node_2_cluster_address = `SELECT @@wsrep_cluster_address` |
| 34 | +SET DEBUG_SYNC='now WAIT_FOR before_fragment'; |
| 35 | +SET GLOBAL wsrep_cluster_address = ''; |
| 36 | + |
| 37 | +--let $wait_condition = SELECT VARIABLE_VALUE = 'Disconnected' FROM information_schema.global_status WHERE VARIABLE_NAME = 'wsrep_cluster_status'; |
| 38 | +--source include/wait_condition.inc |
| 39 | +SET DEBUG_SYNC = 'now SIGNAL continue'; |
| 40 | + |
| 41 | + |
| 42 | +# |
| 43 | +# Disconnect causes connection to node_2 to be closed |
| 44 | +# |
| 45 | +--connection node_2 |
| 46 | +--error 2013 # CR_SERVER_LOST |
| 47 | +--reap |
| 48 | + |
| 49 | + |
| 50 | +# |
| 51 | +# Reconnect node 2 |
| 52 | +# |
| 53 | +--connection node_2a |
| 54 | +--disable_query_log |
| 55 | +--eval SET GLOBAL wsrep_cluster_address = '$node_2_cluster_address'; |
| 56 | +--enable_query_log |
| 57 | +--source include/wait_wsrep_ready.inc |
| 58 | + |
| 59 | +# |
| 60 | +# Expect the transaction to be rolled back and cleanup |
| 61 | +# |
| 62 | +SELECT * FROM mysql.wsrep_streaming_log; |
| 63 | +SELECT * FROM t1; |
| 64 | + |
| 65 | +DROP TABLE t1; |
| 66 | +SET DEBUG_SYNC = 'RESET'; |
| 67 | + |
| 68 | +--disconnect node_2 |
| 69 | +--connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2 |
| 70 | + |
| 71 | + |
| 72 | +--source suite/galera/include/auto_increment_offset_restore.inc |
0 commit comments