mariadb/mysql-test/suite/galera_sr/r/GCF-572.result
Daniele Sciascia 88eec3a9a1 MDEV-36393 Test failure on galera_sr.GCF-572
Fix a regression on test galera_sr.GCF-572 introduced by commit
c9a6adba. This commit partially reverted a trivial test fix for
the galera_sr.GCF-572 test (commit 11ef59fb), which was targeted
at 10.6.
This is backporting the fix from commit 11ef59fb fix to 10.5, so
that the test stays the same all versions >= 10.5.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2025-04-02 04:29:40 +02:00

58 lines
1.4 KiB
Text

connection node_2;
connection node_1;
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1;
SET SESSION wsrep_trx_fragment_size = 1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY);
INSERT INTO t2 VALUES (1),(2),(3);
ALTER TABLE t2 DROP PRIMARY KEY;
INSERT INTO t2 VALUES (1);
SET SESSION wsrep_trx_fragment_size = 1;
START TRANSACTION;
INSERT INTO t1 SELECT * FROM t2;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
SELECT * FROM t1;
f1
connection node_2;
SELECT * FROM t1;
f1
connection node_1;
DROP TABLE t1;
DROP TABLE t2;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(10)) ENGINE=InnoDB;
connection node_1;
SET SESSION wsrep_trx_fragment_size = 1;
START TRANSACTION;
INSERT INTO t1 VALUES (1, 'node1');
connection node_1a;
INSERT INTO t1 VALUES (5, 'node2');
connection node_1;
INSERT INTO t1 VALUES (5, 'node1');
ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
SELECT * FROM t1;
f1 f2
1 node1
5 node2
SET SESSION wsrep_trx_fragment_size = 10000;
START TRANSACTION;
INSERT INTO t1 VALUE (10, 'node1');
connection node_1a;
INSERT INTO t1 VALUES(15, 'node2');
connection node_1;
SELECT * FROM t1;
f1 f2
1 node1
5 node2
10 node1
15 node2
INSERT INTO t1 VALUES(15, 'node1');
ERROR 23000: Duplicate entry '15' for key 'PRIMARY'
COMMIT;
SELECT * FROM t1;
f1 f2
1 node1
5 node2
10 node1
15 node2
DROP TABLE t1;