MDEV-29853 Assertion `!strstr(table->name.m_name, "/FTS_") ||...

MDEV-29853  Assertion `!strstr(table->name.m_name, "/FTS_") || purge_sys.must_wait_FTS()' failed in trx_t::commit

  - Failing debug assertion is to indicate whether the purge thread
is waiting when fts auxilary table is being dropped. But assertion
fails if the table name contains FTS_. So in fts_drop_table(), InnoDB
sets the auxilary table flag in transaction modified table list.
parent 689e9512
......@@ -267,8 +267,7 @@ void trx_t::commit(std::vector<pfs_os_file_t> &deleted)
if (btr_defragment_active)
btr_defragment_remove_table(table);
const fil_space_t *space= table->space;
ut_ad(!strstr(table->name.m_name, "/FTS_") ||
purge_sys.must_wait_FTS());
ut_ad(!p.second.is_aux_table() || purge_sys.must_wait_FTS());
dict_sys.remove(table);
if (const auto id= space ? space->id : 0)
{
......
......@@ -1373,6 +1373,13 @@ static dberr_t fts_drop_table(trx_t *trx, const char *table_name, bool rename)
return err;
}
#ifdef UNIV_DEBUG
for (auto &p : trx->mod_tables)
{
if (p.first == table)
p.second.set_aux_table();
}
#endif /* UNIV_DEBUG */
return DB_SUCCESS;
}
......
......@@ -429,6 +429,10 @@ class trx_mod_table_time_t
/** First modification of a system versioned column
(NONE= no versioning, BULK= the table was dropped) */
undo_no_t first_versioned= NONE;
#ifdef UNIV_DEBUG
/** Whether the modified table is a FTS auxiliary table */
bool fts_aux_table= false;
#endif /* UNIV_DEBUG */
public:
/** Constructor
@param rows number of modified rows so far */
......@@ -483,6 +487,12 @@ class trx_mod_table_time_t
first_versioned= NONE;
return false;
}
#ifdef UNIV_DEBUG
void set_aux_table() { fts_aux_table= true; }
bool is_aux_table() const { return fts_aux_table; }
#endif /* UNIV_DEBUG */
};
/** Collection of persistent tables and their first modification
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment