diff options
author | Sergei Golubchik <serg@mariadb.org> | 2020-06-16 09:34:38 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2020-07-04 01:44:47 +0200 |
commit | 79a3f96166c1c6b46bea859a357ec5c2a11d6b63 (patch) | |
tree | 33aeb9e27aa5f858c819e40969b08a04f413c93b /mysql-test/main/drop.test | |
parent | 529b6dffe9e620d7cb1da30e1df6eebda66f01ee (diff) | |
download | mariadb-git-79a3f96166c1c6b46bea859a357ec5c2a11d6b63.tar.gz |
rewrite bug#26704 test case
drop-no_root needs DROP DATABASE to fail.
But `chmod 000` is not reliable after drop table force anymore.
Make DROP DATABASE to fail by creating an extra file in the db dir
Diffstat (limited to 'mysql-test/main/drop.test')
-rw-r--r-- | mysql-test/main/drop.test | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/main/drop.test b/mysql-test/main/drop.test index 2a2d2715185..17065a32347 100644 --- a/mysql-test/main/drop.test +++ b/mysql-test/main/drop.test @@ -175,6 +175,27 @@ let $MYSQLD_DATADIR= `select @@datadir`; copy_file $MYSQLD_DATADIR/mysql_test/t1.frm $MYSQLD_DATADIR/mysql_test/#sql-347f_6.frm; drop database mysql_test; +# +# Bug#26704: Failing DROP DATABASE brings mysql-client out of sync. +# + +create database mysql_test; +use mysql_test; +create table t1(c int); + +write_file $MYSQLD_DATADIR/mysql_test/do_not_delete; +do_not_delete +EOF + +replace_result $MYSQLD_DATADIR ./ \\ / 41 39; +error ER_DB_DROP_RMDIR; +drop database mysql_test; +select database(); +remove_file $MYSQLD_DATADIR/mysql_test/do_not_delete; +drop database mysql_test; +select database(); +use test; + ########################################################################### --echo |