mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
MDEV-14585 Automatically remove #sql- tables in InnoDB dictionary during recovery
Now that MDEV-14717 made RENAME TABLE crash-safe within InnoDB, it should be safe to drop the #sql- tables within InnoDB during crash recovery. These tables can be one of two things: (1) #sql-ib related to deferred DROP TABLE (follow-up to MDEV-13407) or to table-rebuilding ALTER TABLE...ALGORITHM=INPLACE (since MDEV-14378, only related to the intermediate copy of a table), (2) #sql- related to the intermediate copy of a table during ALTER TABLE...ALGORITHM=COPY We will not drop tables whose name starts with #sql2, because the server can be killed during an ALGORITHM=COPY operation at a point where the original table was renamed to #sql2 but the finished intermediate copy was not yet renamed from #sql- to the original table name.
This commit is contained in:
@@ -2915,7 +2915,7 @@ row_mysql_drop_garbage_tables()
|
||||
table_name = mem_heap_strdupl(
|
||||
heap,
|
||||
reinterpret_cast<const char*>(field), len);
|
||||
if (strstr(table_name, "/" TEMP_FILE_PREFIX_INNODB)) {
|
||||
if (strstr(table_name, "/" TEMP_FILE_PREFIX "-")) {
|
||||
btr_pcur_store_position(&pcur, &mtr);
|
||||
btr_pcur_commit_specify_mtr(&pcur, &mtr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user