mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge of fix for Bug#42003 and Bug#43114 into more actual GCA tree
modifications according to the reviews are included
This commit is contained in:
@ -18,7 +18,7 @@ insert into t2 values ();
|
||||
# set @a:=1
|
||||
# insert into t2 values (@a);
|
||||
|
||||
# test for load data and load data distributed among the several
|
||||
# test for load data and load data distributed among the several
|
||||
# files (we need to fill up first binlog)
|
||||
load data infile '../std_data_ln/words.dat' into table t1;
|
||||
load data infile '../std_data_ln/words.dat' into table t1;
|
||||
@ -103,7 +103,7 @@ select "--- --position --" as "";
|
||||
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/
|
||||
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --position=231 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002
|
||||
|
||||
# Bug#7853 (mysqlbinlog does not accept input from stdin)
|
||||
# Bug#7853 mysqlbinlog does not accept input from stdin
|
||||
--disable_query_log
|
||||
select "--- reading stdin --" as "";
|
||||
--enable_query_log
|
||||
@ -117,7 +117,7 @@ select "--- reading stdin --" as "";
|
||||
drop table t1,t2;
|
||||
|
||||
#
|
||||
#BUG#14157: utf8 encoding in binlog without set character_set_client
|
||||
# Bug#14157 utf8 encoding in binlog without set character_set_client
|
||||
#
|
||||
flush logs;
|
||||
--write_file $MYSQLTEST_VARDIR/tmp/bug14157.sql
|
||||
@ -130,8 +130,8 @@ EOF
|
||||
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/bug14157.sql
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/bug14157.sql
|
||||
|
||||
# resulted binlog, parly consisting of multi-byte utf8 chars,
|
||||
# must be digestable for both client and server. In 4.1 the client
|
||||
# resulted binlog, parly consisting of multi-byte utf8 chars,
|
||||
# must be digestable for both client and server. In 4.1 the client
|
||||
# should use default-character-set same as the server.
|
||||
--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000004 | $MYSQL
|
||||
select * from t5 /* must be (1),(1) */;
|
||||
@ -157,7 +157,7 @@ select * from t5 order by c1;
|
||||
drop table t5;
|
||||
|
||||
#
|
||||
# Bug#20396 Bin Log does not get DELIMETER cmd - Recover StoredProc fails
|
||||
# Bug#20396 Bin Log does not get DELIMETER cmd - Recover StoredProc fails
|
||||
#
|
||||
--disable_warnings
|
||||
drop procedure if exists p1;
|
||||
@ -174,7 +174,6 @@ flush logs;
|
||||
call p1();
|
||||
drop procedure p1;
|
||||
--error ER_SP_DOES_NOT_EXIST
|
||||
|
||||
call p1();
|
||||
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/
|
||||
--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000007
|
||||
@ -217,14 +216,14 @@ flush logs;
|
||||
|
||||
#
|
||||
# Bug#28293 missed '#' sign in the hex dump when the dump length
|
||||
# is divisible by 16.
|
||||
# is divisible by 16.
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (c1 CHAR(10));
|
||||
# we need this for getting fixed timestamps inside of this test
|
||||
flush logs;
|
||||
FLUSH LOGS;
|
||||
INSERT INTO t1 VALUES ('0123456789');
|
||||
flush logs;
|
||||
FLUSH LOGS;
|
||||
DROP TABLE t1;
|
||||
|
||||
# We create a table, patch, and load the output into it
|
||||
@ -232,11 +231,11 @@ DROP TABLE t1;
|
||||
# We can easily see if a 'Query' line is missing the '#' character
|
||||
# as described in the original bug
|
||||
|
||||
--disable_query_log
|
||||
CREATE TABLE patch (a blob);
|
||||
--disable_query_log
|
||||
CREATE TABLE patch (a BLOB);
|
||||
--exec $MYSQL_BINLOG --hexdump --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLTEST_VARDIR/log/master-bin.000011 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_tmp.dat
|
||||
eval LOAD DATA LOCAL INFILE '$MYSQLTEST_VARDIR/tmp/mysqlbinlog_tmp.dat'
|
||||
INTO TABLE patch FIELDS TERMINATED by '' LINES STARTING BY '#';
|
||||
INTO TABLE patch FIELDS TERMINATED BY '' LINES STARTING BY '#';
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_tmp.dat
|
||||
--enable_query_log
|
||||
|
||||
@ -248,49 +247,51 @@ SELECT COUNT(*) AS `BUG#28293_expect_1` FROM patch WHERE a LIKE '%Query%';
|
||||
DROP TABLE patch;
|
||||
|
||||
#
|
||||
# Bug #29928: incorrect connection_id() restoring from mysqlbinlog out
|
||||
# Bug#29928 incorrect connection_id() restoring from mysqlbinlog out
|
||||
#
|
||||
flush logs;
|
||||
create table t1(a int);
|
||||
insert into t1 values(connection_id());
|
||||
let $a= `select a from t1`;
|
||||
flush logs;
|
||||
FLUSH LOGS;
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES(connection_id());
|
||||
let $a= `SELECT a FROM t1`;
|
||||
FLUSH LOGS;
|
||||
--exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000013 > $MYSQLTEST_VARDIR/tmp/bug29928.sql
|
||||
drop table t1;
|
||||
connect (con1, localhost, root, , test);
|
||||
DROP TABLE t1;
|
||||
connect (con1, localhost, root, , test);
|
||||
connection con1;
|
||||
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/bug29928.sql
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/bug29928.sql
|
||||
let $b= `select a from t1`;
|
||||
let $b= `SELECT a FROM t1`;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
let $c= `select $a=$b`;
|
||||
let $c= `SELECT $a=$b`;
|
||||
--echo $c
|
||||
drop table t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
echo shell> mysqlbinlog std_data/corrupt-relay-bin.000624 > var/tmp/bug31793.sql;
|
||||
error 1;
|
||||
exec $MYSQL_BINLOG $MYSQL_TEST_DIR/std_data/corrupt-relay-bin.000624 > $MYSQLTEST_VARDIR/tmp/bug31793.sql;
|
||||
remove_file $MYSQLTEST_VARDIR/tmp/bug31793.sql;
|
||||
|
||||
#
|
||||
# Bug #37313 BINLOG Contains Incorrect server id
|
||||
# Bug#37313 BINLOG Contains Incorrect server id
|
||||
#
|
||||
|
||||
let $save_server_id= `select @@global.server_id`;
|
||||
let $s_id_max=`select (1 << 32) - 1`;
|
||||
eval set @@global.server_id= $s_id_max;
|
||||
let $binlog_file= $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug37313.binlog;
|
||||
let $save_server_id= `SELECT @@global.server_id`;
|
||||
let $s_id_max= `SELECT (1 << 32) - 1`;
|
||||
eval SET @@global.server_id= $s_id_max;
|
||||
|
||||
reset master;
|
||||
flush logs;
|
||||
--exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug37313.binlog
|
||||
RESET MASTER;
|
||||
FLUSH LOGS;
|
||||
--exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000001 > $binlog_file
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval select
|
||||
(@a:=load_file("$MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug37313.binlog"))
|
||||
is not null;
|
||||
let $s_id_unsigned= `select @a like "%server id $s_id_max%" /* must return 1 */`;
|
||||
eval SELECT
|
||||
(@a:=LOAD_FILE("$binlog_file"))
|
||||
IS NOT NULL;
|
||||
let $s_id_unsigned= `SELECT @a LIKE "%server id $s_id_max%" /* must return 1 */`;
|
||||
echo *** Unsigned server_id $s_id_max is found: $s_id_unsigned ***;
|
||||
|
||||
eval set @@global.server_id= $save_server_id;
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug37313.binlog
|
||||
eval SET @@global.server_id= $save_server_id;
|
||||
--remove_file $binlog_file
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
Reference in New Issue
Block a user