Debian Codegraph @

mysql-test/suite/binlog/t/binlog_mdev22915.test

raw
1 --source include/have_innodb.inc
2 --source include/have_binlog_format_row.inc
3
4 RESET MASTER;
5
6 # This sequence of statements triggered a bug, where the pending LOCK TABLES
7 # would skip flusing the pending row event for INSERT to the trx cache. And
8 # Then the pending event would be overwritten by the SAVEPOINT, leaving an
9 # invalid state in the THD. And then a later connection would pick the THD
10 # with invalid state and trigger an assertion.
11 --connect (con1,localhost,root,,)
12 CREATE TABLE t1 (a INT) ENGINE=InnoDB;
13 CREATE TRIGGER tr BEFORE UPDATE ON t1 FOR EACH ROW BEGIN END;
14 LOCK TABLES t1 WRITE;
15 --error ER_TABLE_NOT_LOCKED
16 LOAD DATA INFILE 'x' INTO TABLE x;
17 SET AUTOCOMMIT= OFF;
18 INSERT INTO t1 VALUES (1);
19 SAVEPOINT A;
20 COMMIT;
21 --disconnect con1
22
23 --connect (con2,localhost,root,,)
24 SELECT 1;
25
26 # Cleanup
27 --disconnect con2
28 --connection default
29 # Show the binlog events.
30 # When the bug occurs, the Write_rows event is missing STMT_END_F.
31 --source include/show_binlog_events.inc
32
33 DROP TABLE t1;