Skip to content

Commit e5e83da

Browse files
committed
Make DISCARD TABLESPACE more robust
dict_load_table_low(): Copy the 'discarded' flag to file_unreadable. This allows to avoid a potentially harmful call to dict_stats_init() in ha_innobase::open().
1 parent 2af8f71 commit e5e83da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

storage/innobase/dict/dict0load.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2686,7 +2686,7 @@ static const char* dict_load_table_low(const table_name_t& name,
26862686
*table = dict_mem_table_create(
26872687
name.m_name, space_id, n_cols + n_v_col, n_v_col, flags, flags2);
26882688
(*table)->id = table_id;
2689-
(*table)->file_unreadable = false;
2689+
(*table)->file_unreadable = !!(flags2 & DICT_TF2_DISCARDED);
26902690

26912691
return(NULL);
26922692
}

0 commit comments

Comments
 (0)