Skip to content

Commit e007fcf

Browse files
committed
MDEV-19716: ASAN use-after-poison in Query_log_event::Query_log_event / THD::log_events_and_free_tmp_shares
Post push fix to address test failure. Problem: ======= rpl.rpl_drop_temp_table_invaid_lex added as part bug fix has occasional failures in build bot. MTR's internal check of the test case 'rpl.rpl_drop_temp_table_invaid_lex' failed. Variable_name Value -Slave_open_temp_tables 0 +Slave_open_temp_tables 1 Analysis: ========= The reason for the failure is that the DROP TEMPORARY TABLE command which gets generated on connection disconnect might not have reached the slave and hence the temp table remains on the slave. Fix: === On master, upon disconnect, wait till connection is completely gone. Then ensure that DROP TEMPORARY table statement is available in the binary log. Sync the slave with master and check that temporary table count is zero on slave. Fixed a typo in test name.
1 parent a50cb48 commit e007fcf

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

mysql-test/suite/rpl/r/rpl_drop_temp_table_invaid_lex.result renamed to mysql-test/suite/rpl/r/rpl_drop_temp_table_invalid_lex.result

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@ connect con1,localhost,root,,;
44
CREATE TEMPORARY TABLE tmp (a INT);
55
CREATE TABLE non_existing_db.t SELECT 1 AS b;
66
disconnect con1;
7-
connection default;
7+
connection master;
8+
connection slave;
9+
connection slave;
10+
include/assert.inc ["Slave_open_temp_tables count should be 0"]
811
include/rpl_end.inc

mysql-test/suite/rpl/t/rpl_drop_temp_table_invaid_lex.test renamed to mysql-test/suite/rpl/t/rpl_drop_temp_table_invalid_lex.test

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,25 @@
1717
# MDEV-19716: ASAN use-after-poison in Query_log_event::Query_log_event /
1818
# THD::log_events_and_free_tmp_shares
1919

20+
--source include/have_binlog_format_mixed_or_statement.inc
2021
--source include/master-slave.inc
2122

2223
--connect (con1,localhost,root,,)
23-
2424
CREATE TEMPORARY TABLE tmp (a INT);
2525

2626
--send CREATE TABLE non_existing_db.t SELECT 1 AS b
2727
--disconnect con1
28+
--source include/wait_until_disconnected.inc
29+
30+
--connection master
31+
--let $wait_binlog_event= DROP
32+
--source include/wait_for_binlog_event.inc
33+
sync_slave_with_master;
2834

29-
--connection default
35+
--connection slave
36+
--let $open_temp_tbl_count=query_get_value(show status like 'Slave_open_temp_tables', Value, 1)
37+
--let $assert_cond= "open_temp_tbl_count" = 0
38+
--let $assert_text= "Slave_open_temp_tables count should be 0"
39+
--source include/assert.inc
3040

3141
--source include/rpl_end.inc

0 commit comments

Comments
 (0)