Deadlock on simultaneous TRUNCATE and SELECT FROM information_schema
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
|||
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
High
|
Sergei Glushchenko | ||
5.1 |
Fix Released
|
High
|
Sergei Glushchenko |
Bug Description
Hello,
We are having trouble with servers suspending (sometimes crashing) when a TRUNCATE TABLE is done together
with selecting data over same table from information_schema.
When suspended no query is executed, it is not possible to shutdown the server. The only solution is kill -9.
We are also experiencing it in production.
To reproduce:
CREATE DATABASE IF NOT EXISTS testdb;
use testdb;
DROP TABLE IF EXISTS test;
CREATE TABLE test (
id INTEGER,
text VARCHAR(60)
)ENGINE InnoDB;
--------
#!/bin/bash
for i in $(seq 1 100); do
mysql testdb -e 'TRUNCATE TABLE test' & # <---- note the &
mysql information_schema -e 'SELECT * FROM tables WHERE table_schema=
done
Server version: 5.1.59-rel13.0-log from Percona downloads
OS: Debian Squeeze amd64
Related branches
- Alexey Kopytov (community): Approve
-
Diff: 76 lines (+37/-2)1 file modifiedPercona-Server/storage/innodb_plugin/dict/dict0dict.c (+37/-2)
Changed in percona-server: | |
importance: | Undecided → High |
Changed in percona-server: | |
assignee: | nobody → Sergei Glushchenko (sergei.glushchenko) |
Changed in percona-server: | |
status: | New → In Progress |
Changed in percona-server: | |
status: | In Progress → Fix Committed |
Changed in percona-server: | |
status: | Fix Committed → Fix Released |
cant't repeat in Percona- Server- 5.5.18- rel23.0