1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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 1bd681c8b3
(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.
This commit is contained in:
Marko Mäkelä
2022-12-15 11:14:23 +02:00
parent 697dbd15e0
commit c562ccf796
13 changed files with 31 additions and 12 deletions

View File

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

View File

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

View File

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