summaryrefslogtreecommitdiff
path: root/mysql-test/t/mysqlbinlog.test
diff options
context:
space:
mode:
authorunknown <mkindahl@dl145h.mysql.com>2007-11-28 12:34:25 +0100
committerunknown <mkindahl@dl145h.mysql.com>2007-11-28 12:34:25 +0100
commit417b76b11f12294299eb09f86464e7916496bb8d (patch)
tree121ac9b9027248b66cb005404815523183655ac1 /mysql-test/t/mysqlbinlog.test
parent7441a8004d89f213f468def79669dd3ca8cd1145 (diff)
parent07aa68b04a0ee39b7c1e4f6b51fd18f32988cb83 (diff)
downloadmariadb-git-417b76b11f12294299eb09f86464e7916496bb8d.tar.gz
Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl-merge
into dl145h.mysql.com:/data0/mkindahl/mysql-5.1-new-rpl mysql-test/lib/mtr_report.pl: Auto merged mysql-test/r/mysqlbinlog.result: Auto merged mysql-test/t/mysqlbinlog.test: Auto merged sql/log_event.cc: Auto merged mysql-test/mysql-test-run.pl: Manual merge mysql-test/lib/mtr_cases.pl: Manual merge, using remote code.
Diffstat (limited to 'mysql-test/t/mysqlbinlog.test')
-rw-r--r--mysql-test/t/mysqlbinlog.test27
1 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test
index 1afc105e34e..18b08cf11d6 100644
--- a/mysql-test/t/mysqlbinlog.test
+++ b/mysql-test/t/mysqlbinlog.test
@@ -282,4 +282,31 @@ connection default;
DROP DATABASE mysqltest1;
DROP USER untrusted@localhost;
+--echo BUG#32580: mysqlbinlog cannot read binlog event with user variables
+
+# Testing that various kinds of events can be read and restored properly.
+
+connection default;
+USE test;
+SET BINLOG_FORMAT = STATEMENT;
+FLUSH LOGS;
+CREATE TABLE t1 (a_real FLOAT, an_int INT, a_decimal DECIMAL(5,2), a_string CHAR(32));
+SET @a_real = rand(20) * 1000;
+SET @an_int = 1000;
+SET @a_decimal = CAST(rand(19) * 999 AS DECIMAL(5,2));
+SET @a_string = 'Just a test';
+INSERT INTO t1 VALUES (@a_real, @an_int, @a_decimal, @a_string);
+FLUSH LOGS;
+query_vertical SELECT * FROM t1;
+DROP TABLE t1;
+
+echo >> mysqlbinlog var/log/master-bin.000019 > var/tmp/bug32580.sql;
+exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000019 > $MYSQLTEST_VARDIR/tmp/bug32580.sql;
+echo >> mysql test < var/tmp/bug32580.sql;
+exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/bug32580.sql;
+remove_file $MYSQLTEST_VARDIR/tmp/bug32580.sql;
+
+query_vertical SELECT * FROM t1;
+DROP TABLE t1;
+
--echo End of 5.1 tests