summaryrefslogtreecommitdiff
path: root/mysql-test/t/mysqlbinlog.test
diff options
context:
space:
mode:
authorSven Sandberg <sven.sandberg@oracle.com>2011-03-25 15:35:45 +0100
committerSven Sandberg <sven.sandberg@oracle.com>2011-03-25 15:35:45 +0100
commit0907c91314fe98833d12e5a44882505c6f4939ad (patch)
treed213422c9847924f7fb0aefc823ccf3c9fcc6566 /mysql-test/t/mysqlbinlog.test
parent494174556d8172494ba178b4dd667170eede6997 (diff)
parentf1b638d33cdf95b70fa925cce304864c96fdf7ee (diff)
downloadmariadb-git-0907c91314fe98833d12e5a44882505c6f4939ad.tar.gz
Merged BUG#11766427, BUG#59539 from 5.1 to 5.5.
No conflicts.
Diffstat (limited to 'mysql-test/t/mysqlbinlog.test')
-rw-r--r--mysql-test/t/mysqlbinlog.test20
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test
index 714cfbbaa9b..f64d8b502ae 100644
--- a/mysql-test/t/mysqlbinlog.test
+++ b/mysql-test/t/mysqlbinlog.test
@@ -527,3 +527,23 @@ exec $MYSQL_BINLOG $MYSQLD_DATADIR/$master_binlog | $MYSQL test 2>&1;
let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1);
source include/show_binlog_events.inc;
+#
+# BUG#11766427 BUG#59530: Filter by server id in mysqlbinlog fails
+# This test checks that the format description log event is not
+# filtered out by the --server-id option.
+#
+RESET MASTER;
+USE test;
+CREATE TABLE t1 (a INT);
+--let $old_server_id= `SELECT @@GLOBAL.SERVER_ID`
+SET GLOBAL SERVER_ID = 2;
+DROP TABLE t1;
+--let $master_binlog= query_get_value(SHOW MASTER STATUS, File, 1)
+FLUSH LOGS;
+# The following should only create t1, not drop it.
+--exec $MYSQL_BINLOG --server-id=1 $MYSQLD_DATADIR/$master_binlog | $MYSQL
+SHOW TABLES IN test;
+# The following should only drop t1, not create it.
+--exec $MYSQL_BINLOG --server-id=2 $MYSQLD_DATADIR/$master_binlog | $MYSQL
+SHOW TABLES IN test;
+eval SET GLOBAL SERVER_ID = $old_server_id;