[MDEV-21283] InnoDB: MySQL is trying to drop database…open handles to table …`#sql-ib1148` Created: 2019-12-11  Updated: 2021-09-30  Resolved: 2021-09-23

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB, Tests
Affects Version/s: 10.2, 10.5
Fix Version/s: 10.6.2

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Won't Fix Votes: 1
Labels: affects-tests

Issue Links:
Blocks
is blocked by MDEV-21175 Remove dict_table_t::n_foreign_key_ch... Closed
is blocked by MDEV-21602 CREATE TABLE…PRIMARY KEY…SELECT worka... Closed
Duplicate
is duplicated by MDEV-22955 innodb.innodb-alter fails in buildbot... Open
Relates
relates to MDEV-16678 Use MDL for innodb background threads... Closed

 Description   

Immediately after the push of MDEV-16678 into 10.5, we got the following failure on one platform:

10.5 adb117cf6901a0e0da7577267be1209359892207

innodb.foreign_key 'innodb'              w1 [ fail ]  Found warnings/errors in server log file!
        Test ended at 2019-12-10 21:04:58
line
2019-12-10 21:04:53 3 [Warning] InnoDB: MySQL is trying to drop database `best`.`` though there are still open handles to table `best`.`#sql-ib1148`.
^ Found warnings in /dev/shm/var/1/log/mysqld.1.err

http://buildbot.askmonty.org/buildbot/builders/kvm-rpm-centos74-amd64-debug/builds/3140/steps/mtr/logs/stdio

I am unable to repeat the failure. I believe that this could have been caused by the second commit of MDEV-16678.

I believe that this would be best addressed by MDEV-8069 where the to-be-dropped tables would be moved into a separate directory.



 Comments   
Comment by Vladislav Vaintroub [ 2020-04-08 ]

http://buildbot.askmonty.org/buildbot/builders/win32-debug/builds/16760/steps/test/logs/stdio

Test ended at 2020-04-07 14:53:19
line
2020-04-07 14:53:13 3 [Warning] InnoDB: MySQL is trying to drop database `best`.`` though there are still open handles to table `best`.`#sql-ib899`.

^ Found warnings in D:/win32-debug/build/mysql-test/var/3/log/mysqld.1.err
ok

  • saving 'D:/win32-debug/build/mysql-test/var/3/log/innodb.foreign_key-innodb/' to 'D:/win32-debug/build/mysql-test/var/log/innodb.foreign_key-innodb/'
Comment by Marko Mäkelä [ 2020-05-26 ]

The root cause of this is the background DROP TABLE queue, which cannot be removed before MDEV-21602 and MDEV-21175 have been addressed.

Comment by Aleksey Midenkov [ 2020-05-29 ]

http://buildbot.askmonty.org/buildbot/builders/kvm-bintar-quantal-amd64/builds/21597/steps/mtr/logs/stdio

Comment by Marko Mäkelä [ 2020-06-11 ]

Because we addressed MDEV-8069 with a much simpler change (relying on delete-on-close semantics), it did not fix this bug:

10.5 c9f262ee0d256368cab4fdb894fd31d5fb669680

innodb_fts.innodb_fts_misc 'innodb'      w2 [ fail ]  Found warnings/errors in server log file!
        Test ended at 2020-06-11 16:35:47
line
2020-06-11 16:35:44 3 [Warning] InnoDB: MySQL is trying to drop database `benu database`.`` though there are still open handles to table `benu database`.`#sql-ib1795`.
^ Found warnings in /dev/shm/10.5/mysql-test/var/2/log/mysqld.1.err
ok

Comment by Alice Sherepa [ 2020-10-15 ]

http://buildbot.askmonty.org/buildbot/builders/kvm-fulltest2/builds/25074/steps/mtr_ps/logs/stdio

Comment by Alice Sherepa [ 2020-12-18 ]

10.5 http://buildbot.askmonty.org/buildbot/builders/kvm-deb-stretch-x86/builds/8834/steps/mtr/logs/stdio

Comment by Marko Mäkelä [ 2021-09-23 ]

In MariaDB Server 10.6.2, this was fixed by MDEV-25506 part 3, by removing the "background DROP TABLE queue" hack. I do not think that this is fixable in earlier versions.

Generated at Thu Feb 08 09:05:58 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.