1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

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)
This commit is contained in:
Jim Winstead
2009-05-18 12:52:51 -07:00
parent 2a4e1220c8
commit 7117ee8ccc
3 changed files with 49 additions and 16 deletions

View File

@ -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;