File: MDEV-25718.test

package info (click to toggle)
mariadb 1%3A11.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 765,428 kB
  • sloc: ansic: 2,382,827; cpp: 1,803,532; asm: 378,315; perl: 63,176; sh: 46,496; pascal: 40,776; java: 39,363; yacc: 20,428; python: 19,506; sql: 17,864; xml: 12,463; ruby: 8,544; makefile: 6,059; cs: 5,855; ada: 1,700; lex: 1,193; javascript: 1,039; objc: 80; tcl: 73; awk: 46; php: 22
file content (64 lines) | stat: -rw-r--r-- 2,031 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#
# MDEV-25718 Assertion `transaction.is_streaming()' failed in
#            void wsrep::transaction::adopt()
#

--source include/galera_cluster.inc
--source include/have_debug_sync.inc

CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);

#
# Start a SR transaction and block it after it has replicated
# a fragment. Notice the transaction is still in executing state.
#
--connection node_1
SET SESSION wsrep_trx_fragment_size = 1;
START TRANSACTION;
SET debug_sync = "ha_write_row_end SIGNAL write_row_end WAIT_FOR write_row_continue";
--send INSERT INTO t1 VALUES (1);

--connect node_ctrl, 127.0.0.1, root, , test, $NODE_MYPORT_1
--connection node_ctrl
SET debug_sync = "now WAIT_FOR write_row_end";
SET GLOBAL debug_dbug = '+d,wsrep_streaming_rollback';

#
# Issue a conflicting DDL, that will block in streaming_rollback
# sync point.
#
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
--connection node_1a
--send TRUNCATE TABLE t1;

--connection node_ctrl
SET SESSION debug_sync = "now WAIT_FOR wsrep_streaming_rollback_reached";

#
# Let the INSERT continue. If bug is present will be able to go through
# before_rollback() / streaming_rollback() and clear its streaming context,
# which causes the assertion to trigger in BF aborter.
#
SET SESSION wsrep_sync_wait = 0;
SET debug_sync = "now SIGNAL write_row_continue";

# Let's give the INSERT some time, to make sure it does rollback
--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');
--let $wait_condition_on_error_output = SELECT INFO, STATE FROM INFORMATION_SCHEMA.PROCESSLIST
--source include/wait_condition_with_debug.inc

# Resume the DDL in streaming_rollback
SET SESSION debug_sync = "now SIGNAL wsrep_streaming_rollback_continue";

--connection node_1a
--reap

--connection node_1
--error ER_LOCK_DEADLOCK
--reap

# Cleanup
--connection node_ctrl
SET GLOBAL debug_dbug = "";
SET DEBUG_SYNC = 'RESET';
DROP TABLE t1;