summaryrefslogtreecommitdiff
path: root/mysql-test/t/mysqlbinlog.test
diff options
context:
space:
mode:
authorAndrei Elkin <aelkin@mysql.com>2009-02-24 16:35:45 +0200
committerAndrei Elkin <aelkin@mysql.com>2009-02-24 16:35:45 +0200
commita6ac350b3aacb277a15b8c2b03da4af049556bec (patch)
tree063e4efcbc216ba64a34b9b0001d8f39fb222367 /mysql-test/t/mysqlbinlog.test
parentd091deaf89a09881a34ef67335d042354da75c11 (diff)
parentf94eafb262c44fa865bf011e5b30b0ac7a799be4 (diff)
downloadmariadb-git-a6ac350b3aacb277a15b8c2b03da4af049556bec.tar.gz
merging from 5.0-bt rep to a local branch
Diffstat (limited to 'mysql-test/t/mysqlbinlog.test')
-rw-r--r--mysql-test/t/mysqlbinlog.test25
1 files changed, 22 insertions, 3 deletions
diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test
index d88ca7d0504..87e70e61bef 100644
--- a/mysql-test/t/mysqlbinlog.test
+++ b/mysql-test/t/mysqlbinlog.test
@@ -1,5 +1,4 @@
# We are using .opt file since we need small binlog size
-
-- source include/have_log_bin.inc
# we need this for getting fixed timestamps inside of this test
@@ -174,7 +173,8 @@ delimiter ;//
flush logs;
call p1();
drop procedure p1;
---error 1305
+--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
@@ -226,7 +226,26 @@ flush logs;
INSERT INTO t1 VALUES ('0123456789');
flush logs;
DROP TABLE t1;
---exec $MYSQL_BINLOG --hexdump --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLTEST_VARDIR/log/master-bin.000011 | grep 'Query' | sed 's/[0-9]\{1,\}/REMOVED/g'
+
+# We create a table, patch, and load the output into it
+# By using LINES STARTING BY '#' + SELECT WHERE a LIKE 'Query'
+# 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);
+--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 '#';
+--remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_tmp.dat
+--enable_query_log
+
+--echo We expect this value to be 1
+--echo The bug being tested was that 'Query' lines were not preceded by '#'
+--echo If the line is in the table, it had to have been preceded by a '#'
+--echo
+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