if (fts_exist)
|
{
|
fts_optimize_remove_table(table);
|
purge_sys.stop_FTS(*table);
|
err= fts_lock_tables(trx, *table);
|
if (err != DB_SUCCESS)
|
{
|
rollback:
|
if (fts_exist)
|
{
|
purge_sys.resume_FTS();
|
fts_optimize_add_table(table);
|
}
|
trx->rollback();
|
row_mysql_unlock_data_dictionary(trx);
|
return err;
|
}
|
}
|
|
row_mysql_lock_data_dictionary(trx);
|
trx->op_info = "discarding tablespace";
|
trx->dict_operation= true;
|
|
/* We serialize data dictionary operations with dict_sys.latch:
|
this is to avoid deadlocks during data dictionary operations */
|
|
err= row_discard_tablespace_foreign_key_checks(trx, table);
|
if (err != DB_SUCCESS)
|
goto rollback;
|