1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-31 22:22:30 +03:00
Commit Graph

4 Commits

Author SHA1 Message Date
Marko Mäkelä
8c1c61309d MDEV-27274: DROP TABLE does not delete detached InnoDB files
In commit 1bd681c8b3 (MDEV-25506 part 3)
the way how DDL transactions delete files was rewritten.
Only files that are actually attached to InnoDB tablespaces would be
deleted, and only after the DDL transaction was durably committed.

After a failed ALTER TABLE...IMPORT TABLESPACE, any data files that
the user might have moved to the data directory will not be attached
to the InnoDB data dictionary. Therefore, DROP TABLE would not
attempt to delete those files, and a subsequent CREATE TABLE would
fail. The logic was that the user who created the files outside the
DBMS is still the owner of those files, and InnoDB should not delete
those files because an "ownership transfer" (IMPORT TABLESPACE) was
not successfully completed.

However, not deleting those detached files could surprise users.

ha_innobase::delete_table(): Even if no tablespace exists, try to
delete any files that might match the table name.

Reviewed by: Thirunarayanan Balathandayuthapani
2022-04-29 12:32:44 +03:00
Thirunarayanan Balathandayuthapani
3989d3800d MDEV-27006 Assertion `!lock_trx_has_sys_table_locks(trx)' failed in dberr_t row_discard_tablespace_for_mysql(dict_table_t*, trx_t*)
- InnoDB import operation fails when it tries to unlock data
dictionary lock before releasing the lock on system tables.
2021-11-09 18:08:12 +05:30
Oleksandr Byelkin
6efb5e9f5e Merge branch '10.5' into 10.6 2021-08-02 10:11:41 +02:00
Eugene Kosov
e7855119ba MDEV-26148 SEGV or Assertion `!page_is_comp(page) == !(index->table)->not_redundant()'
FetchIndexRootPages::operator(): handle REDUNDANT vs DYNAMIC case specifically.
Other combinations seems fine as is.
2021-07-27 20:30:33 +03:00