Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
10.0.20, 10.0(EOL), 10.1(EOL)
-
CentOS 6.4
Description
We have run into a scenario where replication breaks on slaves when using MIXED replication and temporary tables.
After a session is switched to ROW due to temporary tables existing, all subsequent events for the session should be in ROW. DDL statements affecting Temporary Tables in ROW format should not be logged.
Test Case |
SET @@global.binlog_format=MIXED;
|
connect;
|
create temporary table ptest1(i int); // This switched session to ROW until temporary table is removed
|
select current_user(); // This switches session MIXED to ROW, and since a temp table exists, all other statements are logged as ROW.
|
create temporary table ptest2(i int);
|
create index i on ptest2(i);
|
Expected behavior
Create index on temporary table is not logged to binlog, since the session should follow ROW logging rules.
Actual behavior
On mariadb 10.0.20, create index is logged and breaks replication on slave
On mysql 5.6.26 and 5.6.14, create index is not logged.
Attaching output from both mysql 5.6 and mariadb 10.0.20 attached, and the binlog from mariadb test.