diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-01-17 15:53:30 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-01-17 16:21:56 +0200 |
commit | 656f66def27b7a2cf42a28f873f1eeef0416aa71 (patch) | |
tree | 46ad8f4c249fab0cc52acc3c8564f71570948a0e /sql | |
parent | 04eef79bf93fc825cf2651633bcbcc21b20e3a83 (diff) | |
download | mariadb-git-656f66def27b7a2cf42a28f873f1eeef0416aa71.tar.gz |
Follow-up fix to MDEV-14585 Automatically remove #sql- tables in InnoDB dictionary during recovery
If InnoDB is killed while ALTER TABLE...ALGORITHM=COPY is in progress,
after recovery there could be undo log records some records that were
inserted into an intermediate copy of the table. Due to these undo log
records, InnoDB would resurrect locks at recovery, and the intermediate
table would be locked while we are trying to drop it. This would cause
a call to row_rename_table_for_mysql(), either from
row_mysql_drop_garbage_tables() or from the rollback of a RENAME
operation that was part of the ALTER TABLE.
row_rename_table_for_mysql(): Do not attempt to parse FOREIGN KEY
constraints when renaming from #sql-something to #sql-something-else,
because it does not make any sense.
row_drop_table_for_mysql(): When deferring DROP TABLE due to locks,
do not rename the table if its name already starts with the #sql-
prefix, which is what row_mysql_drop_garbage_tables() uses.
Previously, the too strict prefix #sql-ib was used, and some
tables were renamed unnecessarily.
Diffstat (limited to 'sql')
0 files changed, 0 insertions, 0 deletions