Debian Codegraph @

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

raw
1
2 #
3 # BUG#36391 and BUG#38731
4 #
5 # The fix for BUG#20103 "Escaping with backslash does not work as expected"
6 # was implemented too greedy though in that it not only changes the behavior
7 # of backslashes within strings but in general, so disabling command shortcuts
8 # like \G or \C (which in turn leads to BUG#36391: "mysqlbinlog creates invalid charset statements".
9 #
10 # The test executes simple commands that are stored in the binary log and
11 # re-execute them through the mysql client which should have to process
12 # some command shortcuts. The backslashes within strings is disabled in the file
13 # rpl_bug36391-master.opt by the option --sql_mode=NO_BACKSLASH_ESCAPES.
14 #
15 #
16
17 --source include/have_log_bin.inc
18 --source include/have_binlog_format_mixed.inc
19
20 CREATE TABLE t1(id INT);
21 let $datadir = `SELECT @@DATADIR`;
22 let $binlog= query_get_value(SHOW MASTER STATUS, File, 1);
23 let $binlog_path= `SELECT CONCAT(@@DATADIR, '$binlog')`;
24 SHOW TABLES;
25 FLUSH LOGS;
26 copy_file $binlog_path $datadir/binlog.saved;
27 DROP TABLE t1;
28
29 # Reset GTIDs
30 RESET MASTER;
31 # Replay binlog
32 --exec $MYSQL_BINLOG $datadir/binlog.saved | $MYSQL test
33 SHOW TABLES;
34
35 # Clean up
36 DROP TABLE t1;
37 --remove_file $datadir/binlog.saved