diff options
author | unknown <knielsen@knielsen-hq.org> | 2011-04-01 15:07:10 +0200 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2011-04-01 15:07:10 +0200 |
commit | c677fea7d01ef1fab3357496b309a3e3b3c00dfe (patch) | |
tree | b6000be3447e5a41440cffee8b8d927d37a1dcde /mysql-test/t/mysqlbinlog.test | |
parent | 09bd2894973fbdbacec9bfc31a3635165b120200 (diff) | |
parent | 9aa44bb4b3e0fc69306626b961c7d9309e6ab114 (diff) | |
download | mariadb-git-c677fea7d01ef1fab3357496b309a3e3b3c00dfe.tar.gz |
Merge MariaDB 5.2.5 release into MariaDB-5.2-rpl.
Diffstat (limited to 'mysql-test/t/mysqlbinlog.test')
-rw-r--r-- | mysql-test/t/mysqlbinlog.test | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test index 3c58affa0f3..bf371443779 100644 --- a/mysql-test/t/mysqlbinlog.test +++ b/mysql-test/t/mysqlbinlog.test @@ -531,3 +531,30 @@ diff_files $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn $MYSQLTEST_VARDIR/tmp/mysqlbin # Cleanup for this part of test remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn.empty; remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn; + +# +# BUG#50914 +# This test verifies if the approach of the mysqlbinlog prints +# "use $database" statements to its output stream will cause +# "No Database Selected" error when dropping and recreating +# that database. +# +RESET MASTER; +CREATE DATABASE test1; +USE test1; +CREATE TABLE t1(id int); +DROP DATABASE test1; +CREATE DATABASE test1; +USE test1; +CREATE TABLE t1(id int); +DROP TABLE t1; +DROP DATABASE test1; +let $master_binlog= query_get_value(SHOW MASTER STATUS, File, 1); +FLUSH LOGS; + +let $MYSQLD_DATADIR= `SELECT @@datadir`; +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; + |