Details
-
Bug
-
Status: Stalled (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.3(EOL)
Description
To reproduce
Setup a usual async master - server setup
Open 2 sessions on the master
Execute on session 1:
set session binlog_format = mixed;
|
|
create temporary table test.t22(a int) engine=MEMORY; |
create temporary table test.t23(a int) engine=innodb; |
|
begin;
|
|
insert into test.t22(a) values(1); |
INSERT INTO test.t23 SELECT * FROM test.t22;
|
SELECT SLEEP(30); |
commit;
|
|
Kill the transaction during select sleep(30) in session 2.
Slave breaks with error:
Error 'Table 'test.t23' doesn't exist' on query. Default database: 'test'. Query: 'INSERT INTO test.t23 SELECT * FROM test.t22' |
Reason:
--> tables are not using PKs, so statement logmode will be choosen.
--> The interrupted transaction cause an implicit "drop temporary table"
--> The begin... transaction will be logged into binlog with rollback,
because transaction tables and non-transactional tables are mixed in one transaction.
Binlog:
|
#190903 13:42:58 server id 1 end_log_pos 614 CRC32 0x84f2060c GTID 0-1-2 ddl |
/*!100001 SET @@session.gtid_seq_no=2*//*!*/; |
# at 614 |
#190903 13:42:58 server id 1 end_log_pos 735 CRC32 0xa207f25e Query thread_id=15 exec_time=6 error_code=0 |
SET TIMESTAMP=1567510978/*!*/; |
/*!\C utf8 *//*!*/; |
SET @@session.character_set_client=33,@@session.collation_connection=45,@@session.collation_server=33/*!*/; |
DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `t23`,`t22` |
/*!*/; |
# at 735 |
#190903 13:42:58 server id 1 end_log_pos 777 CRC32 0x9d1a52fd GTID 0-1-3 ddl |
/*!100001 SET @@session.gtid_seq_no=3*//*!*/; |
BEGIN
|
/*!*/; |
# at 777 |
#190903 13:42:58 server id 1 end_log_pos 896 CRC32 0xfa6b3120 Query thread_id=15 exec_time=0 error_code=0 |
SET TIMESTAMP=1567510978/*!*/; |
/*!\C utf8mb4 *//*!*/; |
SET @@session.character_set_client=45,@@session.collation_connection=45,@@session.collation_server=33/*!*/; |
create temporary table test.t23(a int) engine=innodb |
/*!*/; |
# at 896 |
#190903 13:42:58 server id 1 end_log_pos 996 CRC32 0x8e6e177a Query thread_id=15 exec_time=0 error_code=0 |
SET TIMESTAMP=1567510978/*!*/; |
insert into test.t22(a) values(1) |
/*!*/; |
# at 996 |
#190903 13:42:58 server id 1 end_log_pos 1106 CRC32 0x08d4bda9 Query thread_id=15 exec_time=0 error_code=0 |
SET TIMESTAMP=1567510978/*!*/; |
INSERT INTO test.t23 SELECT * FROM test.t22
|
/*!*/; |
# at 1106 |
#190903 13:42:58 server id 1 end_log_pos 1181 CRC32 0x2ef6d902 Query thread_id=15 exec_time=6 error_code=0 |
SET TIMESTAMP=1567510978/*!*/; |
ROLLBACK
|
/*!*/; |
DELIMITER ;
|
# End of log file
|
ROLLBACK /* added by mysqlbinlog */; |
|
Attachments
Issue Links
- relates to
-
MDEV-20668 Side effect rolled back transaction may replay on slave with error
- Open