mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
InnoDB: Remove a redundant condition and an outdated comment
Since MariaDB 10.2.2, temporary table metadata is not written to the InnoDB data dictionary tables. Therefore, the DICT_TF2_TEMPORARY flag cannot be set in SYS_TABLES, except if there exist orphan temporary tables that were created before MariaDB 10.2.2. trx_resurrect_table_locks(): Do not skip temporary tables. If a resurrect transaction modified a temporary table that was created before MariaDB 10.2.2, that table would be treated internally as a persistent table. It is safer to resurrect locks than to skip the table, because the table would be modified on transaction rollback.
This commit is contained in:
@@ -342,8 +342,7 @@ dict_boot(void)
|
||||
dict_mem_table_add_col(table, heap, "TYPE", DATA_INT, 0, 4);
|
||||
dict_mem_table_add_col(table, heap, "MIX_ID", DATA_BINARY, 0, 0);
|
||||
/* MIX_LEN may contain additional table flags when
|
||||
ROW_FORMAT!=REDUNDANT. Currently, these flags include
|
||||
DICT_TF2_TEMPORARY. */
|
||||
ROW_FORMAT!=REDUNDANT. */
|
||||
dict_mem_table_add_col(table, heap, "MIX_LEN", DATA_INT, 0, 4);
|
||||
dict_mem_table_add_col(table, heap, "CLUSTER_NAME", DATA_BINARY, 0, 0);
|
||||
dict_mem_table_add_col(table, heap, "SPACE", DATA_INT, 0, 4);
|
||||
|
||||
@@ -772,8 +772,7 @@ trx_resurrect_table_locks(
|
||||
i != tables.end(); i++) {
|
||||
if (dict_table_t* table = dict_table_open_on_id(
|
||||
*i, FALSE, DICT_TABLE_OP_LOAD_TABLESPACE)) {
|
||||
if (!table->is_readable()
|
||||
|| dict_table_is_temporary(table)) {
|
||||
if (!table->is_readable()) {
|
||||
mutex_enter(&dict_sys->mutex);
|
||||
dict_table_close(table, TRUE, FALSE);
|
||||
dict_table_remove_from_cache(table);
|
||||
|
||||
Reference in New Issue
Block a user