mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
bdcecfa22c
When binlog is disabled, WSREP will not behave correctly when SAVEPOINT ROLLBACK is executed and we will not rollback transaction.
67 lines
1.9 KiB
Text
67 lines
1.9 KiB
Text
connection node_2;
|
|
connection node_1;
|
|
SET AUTOCOMMIT=OFF;
|
|
CREATE TABLE t1 (f1 VARCHAR(10)) ENGINE=InnoDB;
|
|
SET SESSION wsrep_trx_fragment_size = 1;
|
|
START TRANSACTION;
|
|
INSERT INTO t1 VALUES ('%abcdef%');
|
|
INSERT INTO t1 VALUES ('%abcdef%');
|
|
INSERT INTO t1 VALUES ('%abcdef%');
|
|
INSERT INTO t1 VALUES ('%abcdef%');
|
|
SAVEPOINT A;
|
|
INSERT INTO t1 VALUES ('xyzxyz');
|
|
INSERT INTO t1 VALUES ('xyzxyz');
|
|
INSERT INTO t1 VALUES ('xyzxyz');
|
|
INSERT INTO t1 VALUES ('xyzxyz');
|
|
INSERT INTO t1 VALUES ('xyzxyz');
|
|
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
|
connection node_1a;
|
|
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%abcdef%';
|
|
COUNT(*) > 0
|
|
1
|
|
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%xyz%';
|
|
COUNT(*) > 0
|
|
1
|
|
SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%SAVEPOINT `A`%';
|
|
COUNT(*) = 1
|
|
1
|
|
connection node_1;
|
|
ROLLBACK TO SAVEPOINT A;
|
|
connection node_1a;
|
|
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%abcdef%';
|
|
COUNT(*) > 0
|
|
1
|
|
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%xyz%';
|
|
COUNT(*) > 0
|
|
1
|
|
SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%SAVEPOINT `A`%';
|
|
COUNT(*) = 1
|
|
1
|
|
SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%ROLLBACK TO `A`%';
|
|
COUNT(*) = 1
|
|
0
|
|
connection node_2;
|
|
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%abcdef%';
|
|
COUNT(*) > 0
|
|
1
|
|
SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%xyz%';
|
|
COUNT(*) > 0
|
|
1
|
|
SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%SAVEPOINT `A`%';
|
|
COUNT(*) = 1
|
|
1
|
|
SELECT COUNT(*) = 1 FROM mysql.wsrep_streaming_log WHERE frag LIKE '%ROLLBACK TO `A`%';
|
|
COUNT(*) = 1
|
|
0
|
|
connection node_1;
|
|
ROLLBACK;
|
|
connection node_1a;
|
|
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
|
COUNT(*) = 0
|
|
1
|
|
connection node_2;
|
|
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
|
COUNT(*) = 0
|
|
1
|
|
connection node_1;
|
|
DROP TABLE t1;
|