-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug#16208542 DROP INDEX ON A FOREIGN KEY COLUMN LEADS TO MISSING TABLE
== Analysis == The bug is caused by the reason that dict_load_foreigns() will return error when it couldn't find a equivalent fk index, and dict_load_table() who get the error will return NULL to indicate there is something wrong with the table. This happens no matter which value(1/0) is set to FOREIGN_KEY_CHECKS. == Solution == Allow user to open the table with missing fk indexes when FOREIGN_KEY_CHECKS=0. When the table is opened, user has to recreate the missing indexes to fulfill the fk constraints. After that the table can be open in a normal way. A new enum type in dict_err_ignore_t called DICT_ERR_IGNORE_FK_NOKEY is defined, with which dict_load_foreigns() will always load all the fk constraints and fk indexes ignoring those missing. User can decide which indexes should be created according to the table definition with all the fk constraints. An error message can be found when open a table with missing fk indexes. I think using ib_logf in dict_load_table() to print the error message is an easy way. rb#2308 is approved by Marko
- Loading branch information
bin.x.su@oracle.com
committed
Apr 18, 2013
1 parent
4c4a98e
commit b21b995
Showing
9 changed files
with
94 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters