You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
CREATE TRIGGER trg AFTER UPDATE ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NEW.a);
7
+
SET GLOBAL wsrep_mode=replicate_aria;
8
+
UPDATE t1 SET a=10;
9
+
ERROR HY000: Transactional commit not supported by involved engine(s)
10
+
SELECT * FROM t1;
11
+
a
12
+
1
13
+
2
14
+
SELECT * FROM t2;
15
+
a
16
+
connection node_2;
17
+
SELECT * FROM t1;
18
+
a
19
+
1
20
+
2
21
+
SELECT * FROM t2;
22
+
a
23
+
connection node_1;
24
+
DROP TRIGGER trg;
25
+
DROP TABLE t1,t2;
26
+
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
27
+
INSERT INTO t1 VALUES (1),(2);
28
+
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
29
+
CREATE TRIGGER trg AFTER UPDATE ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NEW.a);
30
+
UPDATE t1 SET a=10;
31
+
SELECT * FROM t1;
32
+
a
33
+
10
34
+
10
35
+
SELECT * FROM t2;
36
+
a
37
+
10
38
+
10
39
+
connection node_2;
40
+
SELECT * FROM t1;
41
+
a
42
+
10
43
+
10
44
+
SELECT * FROM t2;
45
+
a
46
+
10
47
+
10
48
+
connection node_1;
49
+
DROP TRIGGER trg;
50
+
DROP TABLE t1,t2;
51
+
call mtr.add_suppression("WSREP: Replication of non-transactional engines is experimental. Storage engine Aria for table \'test\'\.\'t2\' is not supported in Galera");
CREATE TRIGGER trg AFTER UPDATE ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NEW.a);
8
+
SET GLOBAL wsrep_mode=replicate_aria;
9
+
--error ER_ERROR_DURING_COMMIT
10
+
UPDATE t1 SET a=10;
11
+
SELECT * FROM t1;
12
+
SELECT * FROM t2;
13
+
14
+
--connection node_2
15
+
SELECT * FROM t1;
16
+
SELECT * FROM t2;
17
+
18
+
--connection node_1
19
+
DROP TRIGGER trg;
20
+
DROP TABLE t1,t2;
21
+
22
+
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
23
+
INSERT INTO t1 VALUES (1),(2);
24
+
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
25
+
CREATE TRIGGER trg AFTER UPDATE ON t1 FOR EACH ROW INSERT INTO t2 VALUES (NEW.a);
26
+
UPDATE t1 SET a=10;
27
+
SELECT * FROM t1;
28
+
SELECT * FROM t2;
29
+
30
+
--connection node_2
31
+
SELECT * FROM t1;
32
+
SELECT * FROM t2;
33
+
34
+
--connection node_1
35
+
DROP TRIGGER trg;
36
+
DROP TABLE t1,t2;
37
+
38
+
call mtr.add_suppression("WSREP: Replication of non-transactional engines is experimental. Storage engine Aria for table \'test\'\.\'t2\' is not supported in Galera");
0 commit comments