summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-12-15 11:14:23 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2022-12-15 11:14:23 +0200
commitc562ccf796c085211461386510ea5f7a8137cb96 (patch)
treedfb09ff1a558934573e80b9e877fb25ab6532df2 /mysql-test/suite/innodb
parent697dbd15e0102f33fba1d1d6d9aa964b638f9534 (diff)
downloadmariadb-git-c562ccf796c085211461386510ea5f7a8137cb96.tar.gz
MDEV-30233 DROP DATABASE test fails: Directory not empty
Some tests drop the default mtr database "test". This may fail due to the directory not being empty. InnoDB may not delete all tables immediately, due to the "background drop table queue" or its replacement in commit 1bd681c8b3c5213ce1f7976940a7dc38b48a0d39 (the purge of history would clean up after a DDL operation during which the server was killed). Let us try to avoid "drop database test" whenever it is easily possible. Where it is not, SET GLOBAL innodb_max_purge_lag_wait=0 will ensure that the replacement of the "background drop table queue" will have completed its job.
Diffstat (limited to 'mysql-test/suite/innodb')
-rw-r--r--mysql-test/suite/innodb/r/information_schema_grants.result1
-rw-r--r--mysql-test/suite/innodb/t/information_schema_grants.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb-mdev7046.test2
3 files changed, 5 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/r/information_schema_grants.result b/mysql-test/suite/innodb/r/information_schema_grants.result
index 04550bfa114..b2bd8b657a6 100644
--- a/mysql-test/suite/innodb/r/information_schema_grants.result
+++ b/mysql-test/suite/innodb/r/information_schema_grants.result
@@ -299,6 +299,7 @@ select count(*) > -1 from d_trx;
count(*) > -1
1
connection default;
+SET GLOBAL innodb_max_purge_lag_wait=0;
drop database test;
create database test;
drop user select_only@localhost;
diff --git a/mysql-test/suite/innodb/t/information_schema_grants.test b/mysql-test/suite/innodb/t/information_schema_grants.test
index 34565f76352..32eaefdacb3 100644
--- a/mysql-test/suite/innodb/t/information_schema_grants.test
+++ b/mysql-test/suite/innodb/t/information_schema_grants.test
@@ -306,6 +306,8 @@ select count(*) > -1 from i_trx;
select count(*) > -1 from d_trx;
connection default;
+# Starting with MariaDB 10.6, ensure that DDL recovery will have completed.
+SET GLOBAL innodb_max_purge_lag_wait=0;
drop database test;
create database test;
drop user select_only@localhost;
diff --git a/mysql-test/suite/innodb/t/innodb-mdev7046.test b/mysql-test/suite/innodb/t/innodb-mdev7046.test
index 27c140689c1..52b8e83695a 100644
--- a/mysql-test/suite/innodb/t/innodb-mdev7046.test
+++ b/mysql-test/suite/innodb/t/innodb-mdev7046.test
@@ -31,6 +31,8 @@ RENAME TABLE t1 TO `t2_new..............................................end`;
show warnings;
drop table t1;
+# Starting with MariaDB 10.6, ensure that DDL recovery will have completed.
+SET GLOBAL innodb_max_purge_lag_wait=0;
drop database test;
create database test;
use test;