mirror of
https://github.com/MariaDB/server.git
synced 2025-01-23 07:14:17 +01:00
a7ba25f72b
This test case uses mysqlbinlog to dump the content of master-bin.000001, but the content of master-bin.000001 is not that this test needs. MTR runs a lot of test cases on one server, so when this test starts, the current binlog file might not be master-bin.000001, or there are other events are written by tests before. 'RESET MASTER' command must be called at the begin, it ensures that binlog of this test is wrote to master-bin.000001 correctly. Three other tests have the same problem, They were fixed together. mysqlbinlog-cp932 binlog_incident binlog_tmp_table
28 lines
939 B
Text
28 lines
939 B
Text
# The purpose of this test is to provide a reference for how the
|
|
# incident log event is represented in the output from the mysqlbinlog
|
|
# program.
|
|
|
|
source include/have_log_bin.inc;
|
|
source include/have_debug.inc;
|
|
|
|
let $MYSQLD_DATADIR= `select @@datadir`;
|
|
RESET MASTER;
|
|
|
|
CREATE TABLE t1 (a INT);
|
|
|
|
INSERT INTO t1 VALUES (1),(2),(3);
|
|
SELECT * FROM t1;
|
|
|
|
# This will generate an incident log event and store it in the binary
|
|
# log before the replace statement.
|
|
REPLACE INTO t1 VALUES (4);
|
|
|
|
DROP TABLE t1;
|
|
FLUSH LOGS;
|
|
|
|
exec $MYSQL_BINLOG --start-position=106 $MYSQLD_DATADIR/master-bin.000001 >$MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql;
|
|
--disable_query_log
|
|
eval SELECT cont LIKE '%RELOAD DATABASE; # Shall generate syntax error%' AS `Contain RELOAD DATABASE` FROM (SELECT load_file('$MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql') AS cont) AS tbl;
|
|
--enable_query_log
|
|
|
|
remove_file $MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql;
|