diff options
author | Jim Winstead <jimw@mysql.com> | 2009-05-18 12:52:51 -0700 |
---|---|---|
committer | Jim Winstead <jimw@mysql.com> | 2009-05-18 12:52:51 -0700 |
commit | 7117ee8ccc9e7bbac876871cb3bf31019a882b4c (patch) | |
tree | dfa5c820c3bad66d57bf8e8d0d571c2e9ac1700f /mysql-test/t/mysqldump.test | |
parent | 2a4e1220c8a382e4f7d15da714d465558b0de685 (diff) | |
download | mariadb-git-7117ee8ccc9e7bbac876871cb3bf31019a882b4c.tar.gz |
The output of mysqldump --tab for views included a DROP TABLE statement
without the IF EXISTS qualifier even though no temporary table is created
as for all-in-one dumps including views. (Bug #37377)
Diffstat (limited to 'mysql-test/t/mysqldump.test')
-rw-r--r-- | mysql-test/t/mysqldump.test | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 64d1036e264..6fc8d7bdfea 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -1948,6 +1948,29 @@ DROP DATABASE mysqldump_test_db; --echo # -- End of test case for Bug#32538. --echo +--echo # +--echo # Bug#37377 Incorrect DROP TABLE statement in dump of a VIEW using --tab +--echo # + +create table t1 (a int); +create view v1 as select a from t1; + +--exec $MYSQL_DUMP --skip-comments --tab=$MYSQLTEST_VARDIR/tmp/ test t1 v1 + +drop view v1; +drop table t1; + +--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/t1.sql +--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/v1.sql + +drop view v1; +drop table t1; + +--remove_file $MYSQLTEST_VARDIR/tmp/t1.sql +--remove_file $MYSQLTEST_VARDIR/tmp/t1.txt +--remove_file $MYSQLTEST_VARDIR/tmp/v1.sql + + # We reset concurrent_inserts value to whatever it was at the start of the test # This line must be executed _after_ all test cases. SET @@GLOBAL.CONCURRENT_INSERT = @OLD_CONCURRENT_INSERT; |