mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
BUG#38068: binlog_stm_binlog fails sporadically in pushbuild
Problem: binlog_stm_binlog runs INSERT DELAYED queries, and then prints the contents of the binlog. Before checking the contents of the binlog, the test waits until the rows have appeared in the table. However, this is not enough, since INSERT DELAYED does not write rows to the binlog at the same time as it writes them to the table. So there is a race. Fix: Add a FLUSH TABLES before SHOW BINLOG EVENTS. That waits until the insert_delayed thread is done. mysql-test/extra/binlog_tests/binlog_insert_delayed.test: - Added FLUSH TABLES, so that SHOW BINLOG EVENTS becomes deterministic. - Added comments. - Removed unnecessary 'set @@session.auto_increment_increment' statements. - Removed unnecessary check that the number of rows inserted to the table is 11. mysql-test/suite/binlog/r/binlog_stm_binlog.result: updated result file
This commit is contained in:
@ -629,10 +629,10 @@ master-bin.000001 # Query # # use `mysql`; UPDATE user SET password=password('An
|
||||
master-bin.000001 # Query # # use `mysql`; DELETE FROM user WHERE host='localhost' AND user='@#@'
|
||||
drop table t1,t2,t3,tt1;
|
||||
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
|
||||
set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1;
|
||||
insert delayed into t1 values (207);
|
||||
insert delayed into t1 values (null);
|
||||
insert delayed into t1 values (300);
|
||||
FLUSH TABLES;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; create table t1 (id tinyint auto_increment primary key)
|
||||
@ -660,9 +660,9 @@ master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # use `test`; COMMIT
|
||||
master-bin.000001 # Query # # use `test`; FLUSH TABLES
|
||||
insert delayed into t1 values (null),(null),(null),(null);
|
||||
insert delayed into t1 values (null),(null),(400),(null);
|
||||
11 == 11
|
||||
select * from t1;
|
||||
a
|
||||
207
|
||||
|
Reference in New Issue
Block a user