"DROP DATABASE" may block indefinitely
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL patches by Codership | Status tracked in 5.6 | |||||
5.5 |
Invalid
|
Undecided
|
Yan Zhang | |||
5.6 |
Fix Released
|
Medium
|
Yan Zhang | |||
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC | Status tracked in 5.6 | |||||
5.5 |
Invalid
|
Undecided
|
Unassigned | |||
5.6 |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Steps to Reproduce:
1, Install Percona-
2, mysql < dbs.sql (download it from Bug Attachments)
3, Add "table_
4, restart PXC.
5, mysql -e "DELETE FROM db444.t; DROP DATABASE db444"
6, If the command in Step 5 blocks, the bug is reproduced. Otherwise, go back to Step 5 and try a different database (db1, db2, ... db999) until the bug is reproduced.
Possible Explanation:
In storage/
This makes some table's reference count non-zero forever. As a result, when MySQL drops a database, it could enter into an infinite loop (see storage/
Possible Fix:
I fixed my copy of PXC by applying the patch attached here. I am not very familiar with MySQL source code, so I am not sure if my fix is the right way to fix the problem or not. But, I cannot reproduce the problem any more after the fix.
Related branches
summary: |
- Table reference counter is not decreased in wsrep foreign key check + "DROP DATABASE" may block indefinitely |
description: | updated |
Changed in codership-mysql: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
could you give some instructions to reproduce this bug?