New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bug 79610 / 1525407 (Failed DROP DATABASE due FK constraint on ma… #666
Merged
laurynas-biveinis
merged 1 commit into
percona:5.5
from
laurynas-biveinis:bug1525407-5.5
Jul 19, 2016
Merged
Fix bug 79610 / 1525407 (Failed DROP DATABASE due FK constraint on ma… #666
laurynas-biveinis
merged 1 commit into
percona:5.5
from
laurynas-biveinis:bug1525407-5.5
Jul 19, 2016
Conversation
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
|
||
USE `db2`; | ||
|
||
create table a1(f1 int); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a1 and a2 are not used
LGTM, minor comments only |
…ster breaks slave) If DROP DATABASE fails to delete any of the tables, it is binlogged as DROP TABLE t1, t2, ... for the tables for which drop succeeded. If slave has different schema so that it references any of the dropped tables, replication will break. Fix by running foreign key checks on all the DROP DATABASE tables before any table is actually dropped. If any FK constraint would fail, do not convert DROP DATABASE to DROP TABLE in the binary log and abort immediately. To implement the fix, - add a new handlerton method get_parent_fk_list, that returns the list of foreign keys referencing the given table; - implement this method for InnoDB, make it share code with ha_innobase::get_parent_foreign_key_list handler method; - call it from a new function check_drop_database_foreign_keys, which is called from mysql_rm_table_no_locks. Add a testcase to rpl.rpl_foreign_key_innodb, and adjust binlog.binlog_database as needed.
laurynas-biveinis
force-pushed
the
bug1525407-5.5
branch
from
July 18, 2016 06:08
526490c
to
66cd376
Compare
LGTM |
inikep
pushed a commit
to inikep/percona-server
that referenced
this pull request
Apr 23, 2020
Summary: update-submodule: rocksdb Changes: * extracted deadock information buffer from rocksdb * displayed information of interest to the user by adding a section with information about the latest deadlocks * annotates the transaction id of the transaction that go the deadlock * added small test case to verify the changes and recorded engine transaction status tests Closes facebook/mysql-5.6#666 Reviewed By: lth Differential Revision: D5519254 fbshipit-source-id: 4a46422436b
inikep
pushed a commit
to inikep/percona-server
that referenced
this pull request
Feb 24, 2021
Summary: update-submodule: rocksdb Changes: * extracted deadock information buffer from rocksdb * displayed information of interest to the user by adding a section with information about the latest deadlocks * annotates the transaction id of the transaction that go the deadlock * added small test case to verify the changes and recorded engine transaction status tests Closes facebook/mysql-5.6#666 Reviewed By: lth Differential Revision: D5519254 fbshipit-source-id: 4a46422436b
inikep
pushed a commit
to inikep/percona-server
that referenced
this pull request
Nov 15, 2021
Summary: update-submodule: rocksdb Changes: * extracted deadock information buffer from rocksdb * displayed information of interest to the user by adding a section with information about the latest deadlocks * annotates the transaction id of the transaction that go the deadlock * added small test case to verify the changes and recorded engine transaction status tests Closes facebook/mysql-5.6#666 Reviewed By: lloyd Differential Revision: D5519254 (facebook/mysql-5.6@5913425) fbshipit-source-id: 7183d2edbc2
ldonoso
pushed a commit
to ldonoso/percona-server
that referenced
this pull request
Mar 15, 2022
Summary: @update-submodule: rocksdb Changes: * extracted deadock information buffer from rocksdb * displayed information of interest to the user by adding a section with information about the latest deadlocks * annotates the transaction id of the transaction that go the deadlock * added small test case to verify the changes and recorded engine transaction status tests Closes facebook/mysql-5.6#666 Reviewed By: lloyd Differential Revision: D5519254
inikep
pushed a commit
to inikep/percona-server
that referenced
this pull request
Apr 9, 2024
Summary: @update-submodule: rocksdb Changes: * extracted deadock information buffer from rocksdb * displayed information of interest to the user by adding a section with information about the latest deadlocks * annotates the transaction id of the transaction that go the deadlock * added small test case to verify the changes and recorded engine transaction status tests Closes facebook/mysql-5.6#666 Reviewed By: lloyd Differential Revision: D5519254
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…ster breaks slave)
If DROP DATABASE fails to delete any of the tables, it is binlogged as
DROP TABLE t1, t2, ... for the tables for which drop succeeded. If slave
has different schema so that it references any of the dropped tables,
replication will break.
Fix by running foreign key checks on all the DROP DATABASE tables before
any table is actually dropped. If any FK constraint would fail, do not
convert DROP DATABASE to DROP TABLE in the binary log and abort
immediately.
To implement the fix,
of foreign keys referencing the given table;
ha_innobase::get_parent_foreign_key_list handler method;
called from mysql_rm_table_no_locks.
Add a testcase to rpl.rpl_foreign_key_innodb, and adjust
binlog.binlog_database as needed.
http://jenkins.percona.com/job/percona-server-5.5-param/1253/ + http://jenkins.percona.com/job/percona-server-5.5-param/1254/