File: MDEV-27615.test

package info (click to toggle)
mariadb 1%3A10.11.13-0%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 607,444 kB
  • sloc: ansic: 2,390,393; cpp: 1,764,452; asm: 378,315; perl: 62,256; java: 39,363; pascal: 38,853; sh: 38,128; sql: 19,830; yacc: 19,727; xml: 10,509; python: 9,780; ruby: 8,544; makefile: 6,130; cs: 5,855; ada: 1,700; lex: 1,207; javascript: 1,039; objc: 80; tcl: 73; awk: 46; php: 22
file content (72 lines) | stat: -rw-r--r-- 1,783 bytes parent folder | download | duplicates (3)
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
65
66
67
68
69
70
71
72
#
# MDEV-27615 - Assertion `server_id.is_undefined() == false'
# failed in wsrep::transaction::certify_fragment()
#

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

--let $node_1=node_1
--let $node_2=node_2
--source suite/galera/include/auto_increment_offset_save.inc

--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2

--connection node_2
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB;

#
# Set debug sync point right before the assert
#
SET DEBUG_SYNC='wsrep_before_fragment_certification SIGNAL before_fragment WAIT_FOR continue';

SET SESSION wsrep_trx_fragment_size=1;
START TRANSACTION;
--send INSERT INTO t1 VALUES (1);


#
# Disconnect node_2 from cluster
#
--connection node_2a
SET SESSION wsrep_sync_wait = 0;
--let $node_2_cluster_address = `SELECT @@wsrep_cluster_address`
SET DEBUG_SYNC='now WAIT_FOR before_fragment';
SET GLOBAL wsrep_cluster_address = '';

--let $wait_condition = SELECT VARIABLE_VALUE = 'Disconnected' FROM information_schema.global_status WHERE VARIABLE_NAME = 'wsrep_cluster_status';
--source include/wait_condition.inc
SET DEBUG_SYNC = 'now SIGNAL continue';


#
# Disconnect causes connection to node_2 to be closed
#
--connection node_2
# CR_SERVER_LOST, CR_SSL_CONNECTION_ERROR
--error 2013,2026
--reap


#
# Reconnect node 2
#
--connection node_2a
--disable_query_log
--eval SET GLOBAL wsrep_cluster_address = '$node_2_cluster_address';
--enable_query_log
--source include/wait_wsrep_ready.inc

#
# Expect the transaction to be rolled back and cleanup
#
SELECT * FROM mysql.wsrep_streaming_log;
SELECT * FROM t1;

DROP TABLE t1;
SET DEBUG_SYNC = 'RESET';

--disconnect node_2
--connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2

--source suite/galera/include/auto_increment_offset_restore.inc