MDEV-17904 Crash in fts_is_sync_needed() after failed ALTER or CREATE TABLE
create_table_def(), ha_innobase::create(): Defer fts_optimize_add_table() until after the table has been successfully created.
This commit is contained in:
parent
daca7e70d7
commit
12b1ba195c
@ -9371,10 +9371,6 @@ err_col:
|
||||
: ER_TABLESPACE_EXISTS, MYF(0), display_name);
|
||||
}
|
||||
|
||||
if (err == DB_SUCCESS && (flags2 & DICT_TF2_FTS)) {
|
||||
fts_optimize_add_table(table);
|
||||
}
|
||||
|
||||
error_ret:
|
||||
DBUG_RETURN(convert_error_code_to_mysql(err, flags, thd));
|
||||
}
|
||||
@ -10441,6 +10437,10 @@ ha_innobase::create(
|
||||
trx_free_for_mysql(trx);
|
||||
DBUG_RETURN(-1);
|
||||
}
|
||||
|
||||
mutex_enter(&dict_sys->mutex);
|
||||
fts_optimize_add_table(innobase_table);
|
||||
mutex_exit(&dict_sys->mutex);
|
||||
}
|
||||
|
||||
/* Note: We can't call update_thd() as prebuilt will not be
|
||||
|
@ -10143,10 +10143,6 @@ err_col:
|
||||
: ER_TABLESPACE_EXISTS, MYF(0), display_name);
|
||||
}
|
||||
|
||||
if (err == DB_SUCCESS && (flags2 & DICT_TF2_FTS)) {
|
||||
fts_optimize_add_table(table);
|
||||
}
|
||||
|
||||
error_ret:
|
||||
DBUG_RETURN(convert_error_code_to_mysql(err, flags, thd));
|
||||
}
|
||||
@ -11218,6 +11214,10 @@ ha_innobase::create(
|
||||
trx_free_for_mysql(trx);
|
||||
DBUG_RETURN(-1);
|
||||
}
|
||||
|
||||
mutex_enter(&dict_sys->mutex);
|
||||
fts_optimize_add_table(innobase_table);
|
||||
mutex_exit(&dict_sys->mutex);
|
||||
}
|
||||
|
||||
/* Note: We can't call update_thd() as prebuilt will not be
|
||||
|
Loading…
x
Reference in New Issue
Block a user