mariadb/mysql-test/suite/galera/r/MDEV-36909.result
Jan Lindström 04bf6fdaef MDEV-36909 : Assertion `client_state.transaction().active()' failed in int wsrep_thd_append_key(THD*, const wsrep_key*, int, Wsrep_service_key_type)
Problem was that when trigger was executed it accessed
non-transactional table using Aria-engine. To support
simple DML for Aria we use TOI and befoare TOI was
started existing wsrep transaction is rolled back.
In the following operation on transactional
engine in same statement wsrep transaction is not
active anymore leading to assertion.

However, this is incorrect if there is active
wsrep transaction that has done changes. Instead
we should refuse statement if transactional commit
is not supported.
2025-11-12 09:14:32 +02:00

52 lines
1.1 KiB
Text

connection node_2;
connection node_1;
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (a INT) ENGINE=Aria;
CREATE TRIGGER trg AFTER UPDATE ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NEW.a);
SET GLOBAL wsrep_mode=replicate_aria;
UPDATE t1 SET a=10;
ERROR HY000: Transactional commit not supported by involved engine(s)
SELECT * FROM t1;
a
1
2
SELECT * FROM t2;
a
connection node_2;
SELECT * FROM t1;
a
1
2
SELECT * FROM t2;
a
connection node_1;
DROP TRIGGER trg;
DROP TABLE t1,t2;
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
CREATE TRIGGER trg AFTER UPDATE ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NEW.a);
UPDATE t1 SET a=10;
SELECT * FROM t1;
a
10
10
SELECT * FROM t2;
a
10
10
connection node_2;
SELECT * FROM t1;
a
10
10
SELECT * FROM t2;
a
10
10
connection node_1;
DROP TRIGGER trg;
DROP TABLE t1,t2;
call mtr.add_suppression("WSREP: Replication of non-transactional engines is experimental. Storage engine Aria for table \'test\'\.\'t2\' is not supported in Galera");
SET GLOBAL wsrep_mode=DEFAULT;