Skip to content

Commit 16947e9

Browse files
Andrzej Jarzabekdahlerlend
authored andcommitted
Bug#36526587 Handling of fts during the upgrade process
Symptom: When loading a table containing an FTS index the functiom fts_optimize_add_table may be called twice. Fix: Remove the first of these calls and the code which reverts it in case of failure. Also remove obsolete cases in this code for 57. to 8.0 upgrade. Change-Id: I7efda506e0ca9599c35182624d7d5587d2169487
1 parent e52451a commit 16947e9

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

storage/innobase/dict/dict0load.cc

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1702,13 +1702,9 @@ static void dict_load_columns(dict_table_t *table, mem_heap_t *heap) {
17021702
This case does not arise for table create as
17031703
the flag is set before the table is created. */
17041704

1705-
/* We do not add fts tables to optimize thread
1706-
during upgrade because fts tables will be renamed
1707-
as part of upgrade. These tables will be added
1708-
to fts optimize queue when they are opened. */
1709-
if (table->fts == nullptr && !srv_is_upgrade_mode) {
1705+
if (table->fts == nullptr) {
1706+
ut_ad(!srv_is_upgrade_mode);
17101707
table->fts = fts_create(table);
1711-
fts_optimize_add_table(table);
17121708
}
17131709

17141710
ut_a(table->fts->doc_col == ULINT_UNDEFINED);
@@ -2571,18 +2567,12 @@ static dict_table_t *dict_load_table_one(table_name_t &name, bool cached,
25712567
table->ibd_file_missing || !table->is_corrupted());
25722568

25732569
if (table && table->fts) {
2574-
/* We do not add fts tables to optimize thread
2575-
during upgrade because fts tables will be renamed
2576-
as part of upgrade. These tables will be added
2577-
to fts optimize queue when they are opened. */
2578-
25792570
if (!(dict_table_has_fts_index(table) ||
25802571
DICT_TF2_FLAG_IS_SET(table, DICT_TF2_FTS_HAS_DOC_ID) ||
25812572
DICT_TF2_FLAG_IS_SET(table, DICT_TF2_FTS_ADD_DOC_ID))) {
2582-
/* the table->fts could be created in dict_load_column
2573+
/* the table->fts could be created in dict_load_columns
25832574
when a user defined FTS_DOC_ID is present, but no
25842575
FTS */
2585-
fts_optimize_remove_table(table);
25862576
fts_free(table);
25872577
} else if (!srv_is_upgrade_mode) {
25882578
fts_optimize_add_table(table);

0 commit comments

Comments
 (0)