Details
Description
I've noticed several times failures of the main.cte_nonrecursive test. They usually don't repeat when restarting the test, so they seem sporadic.
Example:
main.cte_nonrecursive w3 [ fail ]
|
Test ended at 2021-11-27 23:03:54
|
|
CURRENT_TEST: main.cte_nonrecursive
|
mysqltest: At line 1220: query 'drop database test' failed: ER_DB_DROP_RMDIR (1010): Error dropping database (can't rmdir './test', errno: 39 "Directory not empty")
|
|
The result from queries just before the failure was:
|
< snip >
|
# MDEV-18460: Server crashed in strmake / tdc_create_key /
|
# THD::create_tmp_table_def_key
|
#
|
connect con1,localhost,root,,;
|
CREATE TEMPORARY TABLE test.t (a INT);
|
WITH cte AS (SELECT 1) SELECT * FROM cte;
|
1
|
1
|
WITH t AS (SELECT 1) SELECT * FROM t;
|
1
|
1
|
WITH cte AS (SELECT 1) SELECT * FROM t;
|
ERROR 3D000: No database selected
|
DROP TABLE test.t;
|
connection default;
|
disconnect con1;
|
#
|
# MDEV-22781: create view with CTE without default database
|
#
|
drop database test;
|
|
More results from queries before failure can be found in /tmp/tmp.SRpydvPo6F/var/3/log/cte_nonrecursive.log
|
|
- saving '/tmp/tmp.SRpydvPo6F/var/3/log/main.cte_nonrecursive/' to '/tmp/tmp.SRpydvPo6F/var/log/main.cte_nonrecursive/'
|
Occurences:
- Salsa-CI mariadb-10.6 on amd64: https://salsa.debian.org/mariadb-team/mariadb-server/-/jobs/2225231/raw
- Debian build mariadb-10.6 on armhf: https://buildd.debian.org/status/fetch.php?pkg=mariadb-10.6&arch=armhf&ver=1%3A10.6.5-1&stamp=1638053889&raw=0
I've seen this failure on MariaDB 10.4 a couple of times too, so I don't think it is specific for 10.6.
otto, I see that the test is executing several DROP DATABASE. The problematic one in your report is
I remember that monty has stated earlier (related to versioning tests) that the test database should never be dropped or re-created. That is, this failure could be worked around by slightly changing the test.
It would be helpful to know which files existed in the directory when it was not empty, so that we would know which earlier test might have left some garbage files behind in that directory. In 10.6, the culprit should not be InnoDB (
MDEV-21283).I made a quick attempt based on https://salsa.debian.org/mariadb-team/mariadb-server/-/jobs/2225231/raw as follows:
Unfortunately, the test main.cte_nonrecursive always passed on my system. I attempted it 3 times.