diff options
Diffstat (limited to 'storage/innobase/row/row0mysql.cc')
-rw-r--r-- | storage/innobase/row/row0mysql.cc | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc index 446895b8f09..50fb5c4d591 100644 --- a/storage/innobase/row/row0mysql.cc +++ b/storage/innobase/row/row0mysql.cc @@ -3940,9 +3940,21 @@ loop: avoid accessing dropped fts aux tables in information scheam when parent table still exists. Note: Drop parent table will drop fts aux tables. */ - char* parent_table_name; - parent_table_name = fts_get_parent_table_name( - table_name, strlen(table_name)); + char* parent_table_name = NULL; + table_id_t table_id; + index_id_t index_id; + + if (dict_table_t::is_aux_table( + table_name, &table_id, &index_id)) { + dict_table_t* parent_table = dict_table_open_on_id( + table_id, TRUE, DICT_TABLE_OP_NORMAL); + if (parent_table != NULL) { + parent_table_name = mem_strdupl( + parent_table->name.m_name, + strlen(parent_table->name.m_name)); + dict_table_close(parent_table, TRUE, FALSE); + } + } if (parent_table_name != NULL) { ut_free(table_name); |