summaryrefslogtreecommitdiff
path: root/mysql-test/t/mysqlbinlog_base64.test
diff options
context:
space:
mode:
authorLuis Soares <luis.soares@oracle.com>2011-05-05 23:48:15 +0100
committerLuis Soares <luis.soares@oracle.com>2011-05-05 23:48:15 +0100
commit0efb452e5e3c201274755731d1867b309a34ae37 (patch)
tree65330aef3a29e043fedb5af0df3ef44a2bd17703 /mysql-test/t/mysqlbinlog_base64.test
parent16f26d2aaf65c2d69e24b7d644cc48a628a55862 (diff)
downloadmariadb-git-0efb452e5e3c201274755731d1867b309a34ae37.tar.gz
BUG#12354268: MYSQLBINLOG --BASE64-OUTPUT=DECODE-ROWS DOES NOT
WORK WITH --START-POSITION If setting --start-position to start after the FD event, mysqlbinlog will output an error stating that it has not found an FD event. However, its not that mysqlbinlog does not find it but rather that it does not processes it in the regular way (i.e., it does not print it). Given that one is using --base64-output=DECODE-ROWS then not printing it is actually fine. To fix this, we make mysqlbinlog not to complain when it has not printed the FD event, is outputing in base64, but is decoding the rows.
Diffstat (limited to 'mysql-test/t/mysqlbinlog_base64.test')
-rw-r--r--mysql-test/t/mysqlbinlog_base64.test29
1 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/t/mysqlbinlog_base64.test b/mysql-test/t/mysqlbinlog_base64.test
index fb21e28fdcb..3d3444cea1c 100644
--- a/mysql-test/t/mysqlbinlog_base64.test
+++ b/mysql-test/t/mysqlbinlog_base64.test
@@ -71,3 +71,32 @@ select count(*) from t2;
--remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_base64.sql
drop table t1;
drop table t2;
+
+#
+# BUG#12354268
+#
+# This test verifies that using --start-position with DECODE-ROWS
+# does not make mysqlbinlog to output an error stating that it
+# does not contain any FD event.
+#
+
+RESET MASTER;
+USE test;
+SET @old_binlog_format= @@binlog_format;
+SET SESSION binlog_format=ROW;
+CREATE TABLE t1(c1 INT);
+--let $master_binlog= query_get_value(SHOW MASTER STATUS, File, 1)
+--let $master_pos= query_get_value(SHOW MASTER STATUS, Position, 1)
+--let $MYSQLD_DATADIR= `SELECT @@datadir`
+
+INSERT INTO t1 VALUES (1);
+
+FLUSH LOGS;
+
+--disable_result_log
+--exec $MYSQL_BINLOG --base64-output=DECODE-ROWS --start-position=$master_pos -v $MYSQLD_DATADIR/$master_binlog
+--enable_result_log
+
+DROP TABLE t1;
+SET SESSION binlog_format= @old_binlog_format;
+RESET MASTER;