summaryrefslogtreecommitdiff
path: root/mysql-test/r/mysql.result
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mysql.com>2010-11-26 17:22:06 +0300
committerAlexander Barkov <bar@mysql.com>2010-11-26 17:22:06 +0300
commitf826970656fa52884fbc7f0f6c86465cb7f0453f (patch)
tree022e1f7c9bd939d0bebdc56c40c2aae935a8fd0e /mysql-test/r/mysql.result
parente3dee8a7fd3e16147145b877917d4aa85346dfcb (diff)
parenta7c09ea9f8f730bcfe285ad8b3672f41dac5e468 (diff)
downloadmariadb-git-f826970656fa52884fbc7f0f6c86465cb7f0453f.tar.gz
Merging from mysql-5.1-bugteam
Diffstat (limited to 'mysql-test/r/mysql.result')
-rw-r--r--mysql-test/r/mysql.result71
1 files changed, 71 insertions, 0 deletions
diff --git a/mysql-test/r/mysql.result b/mysql-test/r/mysql.result
index 3c53faff526..45297ffad8d 100644
--- a/mysql-test/r/mysql.result
+++ b/mysql-test/r/mysql.result
@@ -433,4 +433,75 @@ Bug #47147: mysql client option --skip-column-names does not apply to vertical o
*************************** 1. row ***************************
1
+#
+# Bug #54899: --one-database option cannot handle DROP/CREATE DATABASE
+# commands.
+#
+CREATE DATABASE connected_db;
+USE connected_db;
+SHOW TABLES;
+Tables_in_connected_db
+table_in_connected_db
+DROP DATABASE connected_db;
+
+#
+# Testing --one-database option
+#
+CREATE DATABASE connected_db;
+SHOW TABLES IN connected_db;
+Tables_in_connected_db
+t1
+SHOW TABLES IN test;
+Tables_in_test
+t1
+USE test;
+DROP TABLE t1;
+DROP DATABASE connected_db;
+
+SHOW TABLES IN test;
+Tables_in_test
+SHOW TABLES IN test1;
+Tables_in_test1
+DROP DATABASE test1;
+
+#
+# Checking --one-database option followed by the execution of
+# connect command.
+#
+CREATE DATABASE connected_db;
+SHOW TABLES IN connected_db;
+Tables_in_connected_db
+t1
+t2
+SHOW TABLES IN test;
+Tables_in_test
+t1
+t2
+DROP TABLE test.t1;
+DROP TABLE test.t2;
+DROP DATABASE connected_db;
+
+#
+# Checking --one-database option with no database specified
+# at command-line.
+#
+SHOW TABLES IN test;
+Tables_in_test
+
+#
+# Checking --one-database option with non_existent_db
+# specified with USE command
+#
+SHOW TABLES IN test;
+Tables_in_test
+table_in_test
+DROP DATABASE test;
+
+CREATE DATABASE test;
+SHOW TABLES IN test;
+Tables_in_test
+table_in_test
+DROP DATABASE test;
+CREATE DATABASE test;
+
End of tests