diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-02-11 23:50:40 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-02-11 23:50:40 +0100 |
commit | 8e80f91fa3e584d6b681bfbb4664e80a255af866 (patch) | |
tree | af4f13f6f0290ee72b33a0642aa7c03e4e5fcd1c /mysql-test/extra | |
parent | 63108dc9d2cc9f31ae9927817652be465a17f767 (diff) | |
parent | 3ee8aa216d55b858ba9e53874359dcac9a82933a (diff) | |
download | mariadb-git-8e80f91fa3e584d6b681bfbb4664e80a255af866.tar.gz |
Merge remote-tracking branch 'mysql/5.5' into bb-5.5-merge @ mysql-5.5.42
Diffstat (limited to 'mysql-test/extra')
-rw-r--r-- | mysql-test/extra/binlog_tests/database.test | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/mysql-test/extra/binlog_tests/database.test b/mysql-test/extra/binlog_tests/database.test index d071415bf65..61e8b594185 100644 --- a/mysql-test/extra/binlog_tests/database.test +++ b/mysql-test/extra/binlog_tests/database.test @@ -31,12 +31,47 @@ source include/show_binlog_events.inc; FLUSH STATUS; +--echo +--echo # 'DROP TABLE IF EXISTS <deleted tables>' is binlogged +--echo # when 'DROP DATABASE' fails and at least one table is deleted +--echo # from the database. +RESET MASTER; +CREATE DATABASE testing_1; +USE testing_1; +CREATE TABLE t1(c1 INT); +CREATE TABLE t2(c1 INT); + +let $prefix= `SELECT UUID()`; +--echo # Create a file in the database directory +--replace_result $prefix FAKE_FILE +eval SELECT 'hello' INTO OUTFILE 'fake_file.$prefix'; + +--echo +--echo # 'DROP DATABASE' will fail if there is any other file in the the +--echo # database directory + +# Use '/' instead of '\' in the error message. On windows platform, dir is +# formed with '\'. +--replace_regex /\\testing_1\\*/\/testing_1\// +--error 1010 +DROP DATABASE testing_1; +let $wait_binlog_event= DROP TABLE IF EXIST; +source include/wait_for_binlog_event.inc; +let $MYSQLD_DATADIR= `SELECT @@datadir`; + +--echo +--echo # Remove the fake file. +--remove_file $MYSQLD_DATADIR/testing_1/fake_file.$prefix +--echo # Now we can drop the database. +DROP DATABASE testing_1; + --echo # --echo # Bug#11765416 58381: FAILED DROP DATABASE CAN BREAK STATEMENT --echo # BASED REPLICATION --echo # +USE test; --disable_warnings DROP DATABASE IF EXISTS db1; DROP TABLE IF EXISTS t3; |