mariadb/mysql-test/suite/galera/r/galera_myisam_autocommit.result
Jan Lindström 3228c08fa8 MDEV-22063 : Assertion `0' failed in wsrep::transaction::before_rollback
Problem was that REPLACE was using consistency check that started
TOI and we tried to rollback it.

Do not use wsrep_before_rollback and wsrep_after_rollback if
we are runing consistency check because no writeset keys are
in that case added. Do not allow consistency check usage
if table storage for target table is not InnoDB, instead
give warning. REPLACE|SELECT INTO ... SELECT will use
now TOI if table storage for target table is not InnoDB
to maintain consistency between galera nodes.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2024-01-29 06:34:46 +01:00

51 lines
1 KiB
Text

connection node_2;
connection node_1;
SET GLOBAL wsrep_replicate_myisam=ON;
CREATE TABLE t1 (f1 INTEGER) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2), (3);
INSERT INTO t1 SELECT 4 FROM DUAL UNION ALL SELECT 5 FROM DUAL;
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=MyISAM;
INSERT INTO t2 VALUES (1);
INSERT INTO t2 VALUES (2), (3);
INSERT INTO t2 SELECT 4 FROM DUAL UNION ALL SELECT 5 FROM DUAL;
INSERT INTO t2 VALUES (6), (1);
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
UPDATE t1 SET f1 = 9;
UPDATE t2 SET f1 = 9 WHERE f1 = 1;
DELETE FROM t1 WHERE f1 = 9;
DELETE FROM t2 WHERE f1 = 9;
SELECT * FROM t1 ORDER BY f1;
f1
SELECT * FROM t2 ORDER BY f1;
f1
2
3
4
5
6
connection node_2;
SELECT * FROM t1 ORDER BY f1;
f1
SELECT * FROM t2 ORDER BY f1;
f1
2
3
4
5
6
TRUNCATE TABLE t1;
TRUNCATE TABLE t2;
SELECT * FROM t1 ORDER BY f1;
f1
SELECT * FROM t2 ORDER BY f1;
f1
connection node_2;
SELECT * FROM t1 ORDER BY f1;
f1
SELECT * FROM t2 ORDER BY f1;
f1
connection node_1;
SET GLOBAL wsrep_replicate_myisam=OFF;
DROP TABLE t1;
DROP TABLE t2;