Debian Codegraph @

mysql-test/suite/rpl/t/rpl_drop_temp_table_invalid_lex.test

raw
1 # ==== Purpose ====
2 #
3 # Test verifies that no ASAN issues are reported at the time of writing DROP
4 # TEMPORARY TABLE statements to binary log as part of session cleanup.
5 #
6 # ==== Implementation ====
7 #
8 # Steps:
9 # 1 - Create a new connection named 'con1'.
10 # 2 - Create a temporary table named 'tmp' as part of connection 'con1'.
11 # 3 - Try to disconnect the current session when a CREATE .. SELECT
12 # statement is in the middle of execution.
13 # 4 - Observe that no ASAN issue is reported.
14 #
15 # ==== References ====
16 #
17 # MDEV-19716: ASAN use-after-poison in Query_log_event::Query_log_event /
18 # THD::log_events_and_free_tmp_shares
19
20 --source include/have_binlog_format_mixed_or_statement.inc
21 --source include/master-slave.inc
22
23 --connect (con1,localhost,root,,)
24 CREATE TEMPORARY TABLE tmp (a INT);
25
26 --send CREATE TABLE non_existing_db.t SELECT 1 AS b
27 --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;
34
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
40
41 --source include/rpl_end.inc