mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
Problem: ======== row_discard_tablespace() updates SYS_TABLES, SYS_INDEXES and reassigns the table identifier in SYSTEM TABLES. These changes cannot be rolled back, and row_discard_tablespace_for_mysql() commits the transaction even when row_discard_tablespace() returned an error. If the reassignment in row_mysql_table_id_reassign() fails in the middle then the committed data dictionary is inconsistent and the table can no longer be loaded from it, while the in-memory table definition stays in the dictionary cache and remains usable. Solution: ========= row_discard_tablespace_for_mysql(): If row_discard_tablespace() failed, flag the table as corrupted and report the data dictionary inconsistency in the error log. dict_table_open_on_name(): Check dict_table_t::space before reading fil_space_t::get_compression_algo() from it.