summaryrefslogtreecommitdiff
path: root/mysql-test/t/rpl_drop.test
diff options
context:
space:
mode:
authorunknown <guilhem@mysql.com>2004-07-17 16:58:16 +0200
committerunknown <guilhem@mysql.com>2004-07-17 16:58:16 +0200
commitcf8dbcc683b94b6e7f6c44d51b7241c45813decd (patch)
tree6860c440a1ea832c63bb4d8eb952e4e04d19a791 /mysql-test/t/rpl_drop.test
parent2a64371e649666d54d66193bb52e4d430fe800b8 (diff)
downloadmariadb-git-cf8dbcc683b94b6e7f6c44d51b7241c45813decd.tar.gz
Fixes for
BUG#4506 "mysqlbinlog --position --read-from-remote-server has wrong "# at" lines", BUG#4553 "Multi-table DROP TABLE replicates improperly for nonexistent table" with a test file. It was not possible to add a test for BUG#4506 as in the test suite we must use --short-form which does not display the "# at" lines. client/mysqlbinlog.cc: Fix for BUG#4506 "mysqlbinlog --position --read-from-remote-server has wrong "# at" lines" when reading a remote binlog, the start position is not always BIN_LOG_HEADER_SIZE (4). sql/sql_table.cc: Fix for BUG#4553 "Multi-table DROP TABLE replicates improperly for nonexistent table" we must my_error() _before_ we write to the binlog, so that a meaningful error code is available in thd->net.last_errno for storage of the DROP TABLE statement into the binlog.
Diffstat (limited to 'mysql-test/t/rpl_drop.test')
-rw-r--r--mysql-test/t/rpl_drop.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/t/rpl_drop.test b/mysql-test/t/rpl_drop.test
new file mode 100644
index 00000000000..6fc2500fc97
--- /dev/null
+++ b/mysql-test/t/rpl_drop.test
@@ -0,0 +1,10 @@
+# Testcase for BUG#4552 (DROP on two tables, one of which does not
+# exist, must be binlogged with a non-zero error code)
+source include/master-slave.inc;
+drop table if exists t1, t2;
+create table t1 (a int);
+--error 1051;
+drop table t1, t2;
+save_master_pos;
+connection slave;
+sync_with_master;