diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-06-15 19:09:31 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-06-15 19:09:31 +0200 |
commit | 68a6705ed1dc7a0ff5c86910e23989f97788e741 (patch) | |
tree | 9c9c157920481f06dc13344e86be5c92c68dc473 /mysql-test | |
parent | 6a0a4f00a1741df68c0d201e090f5d28f59410c8 (diff) | |
download | mariadb-git-68a6705ed1dc7a0ff5c86910e23989f97788e741.tar.gz |
MDEV-4441 DROP DATABASE with a newly created ARCHIVE table does not work
1. DROP DATABASE should use ha_discover_table_names(), not look at .frm files.
2. filename_to_tablename() also encodes temp file names #sql- -> #mysql50##sql
3. no special treatment for #sql- files, no TABLE_LIST::internal_tmp_table
4. discover also table file names, that start from #
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/suite/archive/discover.result | 3 | ||||
-rw-r--r-- | mysql-test/suite/archive/discover.test | 7 | ||||
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_drop_db.result | 4 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_drop_db.test | 4 |
4 files changed, 14 insertions, 4 deletions
diff --git a/mysql-test/suite/archive/discover.result b/mysql-test/suite/archive/discover.result index 59e79664eb6..440209643f3 100644 --- a/mysql-test/suite/archive/discover.result +++ b/mysql-test/suite/archive/discover.result @@ -123,3 +123,6 @@ select * from `a/../`; a flush tables; drop table `a/../`; +create database test1; +create table test1.t1 (i int) engine=archive; +drop database test1; diff --git a/mysql-test/suite/archive/discover.test b/mysql-test/suite/archive/discover.test index 0b7e521185d..d8214ddaa07 100644 --- a/mysql-test/suite/archive/discover.test +++ b/mysql-test/suite/archive/discover.test @@ -102,3 +102,10 @@ select * from `a/../`; flush tables; remove_file $mysqld_datadir/test/a@002f@002e@002e@002f.frm; drop table `a/../`; +# +# MDEV-4441 DROP DATABASE with a newly created ARCHIVE table does not work +# +create database test1; +create table test1.t1 (i int) engine=archive; +drop database test1; + diff --git a/mysql-test/suite/rpl/r/rpl_drop_db.result b/mysql-test/suite/rpl/r/rpl_drop_db.result index dda578a419e..800a70c8c9b 100644 --- a/mysql-test/suite/rpl/r/rpl_drop_db.result +++ b/mysql-test/suite/rpl/r/rpl_drop_db.result @@ -8,12 +8,12 @@ select * from mysqltest1.t1 into outfile 'mysqltest1/f1.txt'; create table mysqltest1.t2 (n int); create table mysqltest1.t3 (n int); drop database mysqltest1; -ERROR HY000: Error dropping database (can't rmdir './mysqltest1/', errno: 17 "File exists") +ERROR HY000: Error dropping database (can't rmdir './mysqltest1', errno: 39 "Directory not empty") use mysqltest1; show tables; Tables_in_mysqltest1 drop database mysqltest1; -ERROR HY000: Error dropping database (can't rmdir './mysqltest1/', errno: 17 "File exists") +ERROR HY000: Error dropping database (can't rmdir './mysqltest1', errno: 39 "Directory not empty") use mysqltest1; show tables; Tables_in_mysqltest1 diff --git a/mysql-test/suite/rpl/t/rpl_drop_db.test b/mysql-test/suite/rpl/t/rpl_drop_db.test index c3194f08f52..ac859b4655a 100644 --- a/mysql-test/suite/rpl/t/rpl_drop_db.test +++ b/mysql-test/suite/rpl/t/rpl_drop_db.test @@ -13,7 +13,7 @@ insert into mysqltest1.t1 values (1); select * from mysqltest1.t1 into outfile 'mysqltest1/f1.txt'; create table mysqltest1.t2 (n int); create table mysqltest1.t3 (n int); ---replace_result \\ / +--replace_result \\ / 66 39 --error 1010 drop database mysqltest1; use mysqltest1; @@ -30,7 +30,7 @@ while ($1) } --enable_query_log ---replace_result \\ / +--replace_result \\ / 66 39 --error 1010 drop database mysqltest1; use mysqltest1; |