innodb_expand_import holds data dictionary mutex while scanning .ibd file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
Undecided
|
Alexey Kopytov | ||
5.1 |
Fix Released
|
Undecided
|
Alexey Kopytov | ||
5.5 |
Fix Released
|
Undecided
|
Alexey Kopytov |
Bug Description
ALTER TABLE ... IMPORT TABLESPACE is holding the data dictionary mutex during the entire import operation.
This becomes a problem for innodb_
The only problem with temporarily releasing the mutex is that changing the table's metadata while it's being imported may lead to data dictionary corruption. But in 5.1 any query trying to open that table will fail with an error, because InnoDB sets the ibd_file_missing flag for the in-memory table object until import is complete. In 5.5 queries will block on the metadata lock set by ALTER TABLE. So the table's metadata is protected even without holding the data dictionary mutex.
Related branches
- Laurynas Biveinis (community): Approve
-
Diff: 128 lines (+76/-3)1 file modifiedpatches/innodb_expand_import.patch (+76/-3)
- Percona core: Pending requested
-
Diff: 90 lines (+19/-5)4 files modifiedPercona-Server/storage/innodb_plugin/dict/dict0load.c (+2/-2)
Percona-Server/storage/innodb_plugin/fil/fil0fil.c (+12/-1)
Percona-Server/storage/innodb_plugin/include/fil0fil.h (+4/-1)
Percona-Server/storage/innodb_plugin/row/row0mysql.c (+1/-1)
Percona now uses JIRA for bug reports so this bug report is migrated to: https:/ /jira.percona. com/browse/ PS-2711