Commit 0f502cc5 authored by unknown's avatar unknown

Apply patch from Bug#46010.

This is needed to fix failures seen in Buildbot (main.ctype_gbk_binlog).
Problem is that some tests did not RESET MASTER, causing them to pick up random
binlog files depending on prior tests.
parent d8aa3dbd
RESET MASTER;
SET NAMES gbk; SET NAMES gbk;
CREATE TABLE t1 ( CREATE TABLE t1 (
f1 BLOB f1 BLOB
......
flush logs; RESET MASTER;
create table t3 (f text character set utf8); create table t3 (f text character set utf8);
create table t4 (f text character set cp932); create table t4 (f text character set cp932);
flush logs; flush logs;
......
RESET MASTER;
CREATE TABLE t1 (a INT); CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2),(3); INSERT INTO t1 VALUES (1),(2),(3);
SELECT * FROM t1; SELECT * FROM t1;
......
RESET MASTER;
create table foo (a int); create table foo (a int);
flush logs; flush logs;
create temporary table tmp1_foo like foo; create temporary table tmp1_foo like foo;
......
...@@ -6,6 +6,7 @@ source include/have_log_bin.inc; ...@@ -6,6 +6,7 @@ source include/have_log_bin.inc;
source include/have_debug.inc; source include/have_debug.inc;
let $MYSQLD_DATADIR= `select @@datadir`; let $MYSQLD_DATADIR= `select @@datadir`;
RESET MASTER;
CREATE TABLE t1 (a INT); CREATE TABLE t1 (a INT);
......
...@@ -30,6 +30,7 @@ source include/have_binlog_format_mixed_or_statement.inc; ...@@ -30,6 +30,7 @@ source include/have_binlog_format_mixed_or_statement.inc;
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,); connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
connect (master1,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); create table foo (a int);
......
-- source include/have_binlog_format_mixed_or_statement.inc -- source include/have_binlog_format_mixed_or_statement.inc
-- source include/have_gbk.inc -- source include/have_gbk.inc
RESET MASTER;
SET NAMES gbk; SET NAMES gbk;
--character_set gbk --character_set gbk
......
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
-- source include/have_cp932.inc -- source include/have_cp932.inc
-- source include/have_log_bin.inc -- source include/have_log_bin.inc
RESET MASTER;
# Bug#16217 (mysql client did not know how not switch its internal charset) # 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 t3 (f text character set utf8);
create table t4 (f text character set cp932); create table t4 (f text character set cp932);
--exec $MYSQL --default-character-set=utf8 test -e "insert into t3 values(_utf8'ソ')" --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); ...@@ -14,7 +15,7 @@ create table t4 (f text character set cp932);
flush logs; flush logs;
rename table t3 to t03, t4 to t04; rename table t3 to t03, t4 to t04;
let $MYSQLD_DATADIR= `select @@datadir`; 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 # original and recovered data must be equal
select HEX(f) from t03; select HEX(f) from t03;
select HEX(f) from t3; select HEX(f) from t3;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment