Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
5.5, 10.0, 10.1, 10.2, 10.3, 10.4, 10.5
Description
Test case |
--source include/master-slave.inc
|
--source include/have_binlog_format_mixed.inc
|
--source include/have_innodb.inc
|
|
CREATE TABLE IF NOT EXISTS t1 (f1 INTEGER) ENGINE=InnoDB; |
CREATE TRIGGER tr BEFORE INSERT ON t1 FOR EACH ROW SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; |
INSERT INTO t1 VALUES (1); |
SELECT * FROM t1; |
|
--sync_slave_with_master
|
SELECT * FROM t1; |
|
# Cleanup
|
--connection master
|
DROP TABLE t1; |
--source include/rpl_end.inc |
The master executes its part without complaints and writes everything into the binary log. The slave, however, fails with
2017-12-28 0:20:33 13 [ERROR] Slave SQL: Error 'Transaction characteristics can't be changed while a transaction is in progress' on query. Default database: 'test'. Query: 'INSERT INTO t1 VALUES (1)', Gtid 0-1-3, Internal MariaDB error code: 1568
|
2017-12-28 0:20:33 13 [Warning] Slave: Transaction characteristics can't be changed while a transaction is in progress Error_code: 1568
|
2017-12-28 0:20:33 13 [Warning] Slave: At line 1 in test.tr Error_code: 4094
|
Slave's behavior is documented in MySQL manual:
https://dev.mysql.com/doc/refman/5.5/en/set-transaction.html
SET TRANSACTION ISOLATION LEVEL without GLOBAL or SESSION is not permitted while there is an active transaction
So the problem is apparently on master.
Reproducible also with MySQL 5.5, 5.6, while with MySQL 5.7 INSERT fails on master.