1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-30 11:22:14 +03:00
Files
mariadb/mysql-test/r
Jon Olav Hauglid b4593605e0 Bug #54360 Deadlock DROP/ALTER/CREATE DATABASE with open HANDLER
This deadlock happened if DROP DATABASE was blocked due to an open
HANDLER table from a different connection. While DROP DATABASE
is blocked, it holds the LOCK_mysql_create_db mutex. This results
in a deadlock if the connection with the open HANDLER table tries
to execute a CREATE/ALTER/DROP DATABASE statement as they all
try to acquire LOCK_mysql_create_db.

This patch makes this deadlock scenario very unlikely by closing and
marking for re-open all HANDLER tables for which there are pending
conflicing locks, before LOCK_mysql_create_db is acquired.
However, there is still a very slight possibility that a connection
could access one of these HANDLER tables between closing/marking for
re-open and the acquisition of LOCK_mysql_create_db.

This patch is for 5.1 only, a separate and complete fix will be
made for 5.5+.

Test case added to schema.test.
2010-06-26 19:36:00 +02:00
..
2009-02-10 16:27:35 +03:00
2009-08-20 14:30:59 +02:00
2010-02-25 23:13:11 +04:00
2009-08-10 15:46:20 -03:00
2009-06-01 16:00:38 +04:00
2009-03-27 10:18:06 +08:00
2009-02-07 16:50:31 +01:00
2009-12-11 16:02:47 +02:00
2009-02-03 14:45:17 +01:00
2009-05-06 15:00:14 +05:30
2009-06-15 17:36:51 +03:00
2009-02-10 16:27:35 +03:00
2009-09-02 18:58:17 +02:00
2009-04-09 14:38:50 +05:00
2010-06-01 11:54:06 +04:00
2010-04-27 00:46:52 +04:00
2009-03-16 20:54:50 +01:00
2010-06-09 11:29:27 +03:00
2009-12-17 12:06:36 -08:00
2009-02-19 18:22:28 +01:00
2009-11-06 17:54:19 +03:00
2010-01-29 16:54:27 +02:00
2009-12-10 17:38:01 +02:00
2009-02-03 14:45:17 +01:00
2010-03-12 11:52:38 +01:00
2010-03-12 11:52:38 +01:00
2009-10-27 14:09:36 +04:00
2010-04-30 15:27:17 +04:00
2009-11-27 18:10:28 +02:00
2009-06-10 11:58:36 +03:00
2009-09-28 16:48:40 +03:00
2009-02-09 22:00:15 +01:00
2009-02-19 18:24:25 -05:00
2009-02-14 20:14:10 +03:00
2009-12-22 14:38:33 +04:00
2010-06-04 17:10:22 +03:00