mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug#46010 main.ctype_gbk_binlog fails sporadically : Table 't2' already exists
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
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
RESET MASTER;
|
||||
SET NAMES gbk;
|
||||
CREATE TABLE t1 (
|
||||
f1 BLOB
|
||||
|
@ -1,4 +1,4 @@
|
||||
flush logs;
|
||||
RESET MASTER;
|
||||
create table t3 (f text character set utf8);
|
||||
create table t4 (f text character set cp932);
|
||||
flush logs;
|
||||
|
@ -1,3 +1,4 @@
|
||||
RESET MASTER;
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
SELECT * FROM t1;
|
||||
|
@ -1,3 +1,4 @@
|
||||
RESET MASTER;
|
||||
create table foo (a int);
|
||||
flush logs;
|
||||
create temporary table tmp1_foo like foo;
|
||||
|
@ -6,6 +6,7 @@ source include/have_log_bin.inc;
|
||||
source include/have_debug.inc;
|
||||
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
RESET MASTER;
|
||||
|
||||
CREATE TABLE t1 (a INT);
|
||||
|
||||
@ -24,4 +25,4 @@ exec $MYSQL_BINLOG --start-position=106 $MYSQLD_DATADIR/master-bin.000001 >$MYSQ
|
||||
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;
|
||||
remove_file $MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql;
|
||||
|
@ -30,6 +30,7 @@ source include/have_binlog_format_mixed_or_statement.inc;
|
||||
|
||||
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
|
||||
connect (master1,127.0.0.1,root,,test,$MASTER_MYPORT,);
|
||||
RESET MASTER;
|
||||
|
||||
create table foo (a int);
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
-- source include/have_binlog_format_mixed_or_statement.inc
|
||||
-- source include/have_gbk.inc
|
||||
|
||||
RESET MASTER;
|
||||
SET NAMES gbk;
|
||||
--character_set gbk
|
||||
|
||||
|
@ -5,8 +5,9 @@
|
||||
-- source include/have_cp932.inc
|
||||
-- source include/have_log_bin.inc
|
||||
|
||||
RESET MASTER;
|
||||
|
||||
# Bug#16217 (mysql client did not know how not switch its internal charset)
|
||||
flush logs;
|
||||
create table t3 (f text character set utf8);
|
||||
create table t4 (f text character set cp932);
|
||||
--exec $MYSQL --default-character-set=utf8 test -e "insert into t3 values(_utf8'ソ')"
|
||||
@ -14,7 +15,7 @@ create table t4 (f text character set cp932);
|
||||
flush logs;
|
||||
rename table t3 to t03, t4 to t04;
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
--exec $MYSQL_BINLOG --short-form $MYSQLD_DATADIR/master-bin.000002 | $MYSQL --default-character-set=utf8
|
||||
--exec $MYSQL_BINLOG --short-form $MYSQLD_DATADIR/master-bin.000001 | $MYSQL --default-character-set=utf8
|
||||
# original and recovered data must be equal
|
||||
select HEX(f) from t03;
|
||||
select HEX(f) from t3;
|
||||
|
Reference in New Issue
Block a user