diff --git a/storage/innobase/dict/dict0load.cc b/storage/innobase/dict/dict0load.cc index bec321164a4..9cf26626171 100644 --- a/storage/innobase/dict/dict0load.cc +++ b/storage/innobase/dict/dict0load.cc @@ -2533,8 +2533,8 @@ static dict_table_t *dict_load_table_one(table_name_t &name, bool cached, if (!cached || table->ibd_file_missing) { /* Don't attempt to load the indexes from disk. */ } else if (err == DB_SUCCESS) { - err = dict_load_foreigns(table->name.m_name, nullptr, true, true, - ignore_err, fk_tables); + err = dict_load_foreigns(table->name.m_name, nullptr, true, ignore_err, + fk_tables); if (err != DB_SUCCESS) { ib::warn(ER_IB_MSG_210) << "Load table " << table->name @@ -2734,10 +2734,6 @@ static void dict_load_foreign_cols( const char **col_names, /*!< in: column names, or NULL to use foreign->foreign_table->col_names */ - bool check_recursive, - /*!< in: whether to record the foreign table - parent count to avoid unlimited recursive - load of chained foreign tables */ bool check_charsets, /*!< in: whether to check charset compatibility */ @@ -2768,8 +2764,6 @@ stack. */ size_t id_len; DBUG_TRACE; - DBUG_PRINT("dict_load_foreign", - ("id: '%s', check_recursive: %d", id, check_recursive)); ut_ad(dict_sys_mutex_own()); @@ -2917,9 +2911,6 @@ dberr_t dict_load_foreigns( const char *table_name, /*!< in: table name */ const char **col_names, /*!< in: column names, or NULL to use table->col_names */ - bool check_recursive, /*!< in: Whether to check - recursive load of tables - chained by FK */ bool check_charsets, /*!< in: whether to check charset compatibility */ dict_err_ignore_t ignore_err, /*!< in: error to be ignored */ @@ -3032,8 +3023,8 @@ loop: /* Load the foreign constraint definition to the dictionary cache */ - err = dict_load_foreign(fk_id, col_names, check_recursive, check_charsets, - ignore_err, fk_tables); + err = dict_load_foreign(fk_id, col_names, check_charsets, ignore_err, + fk_tables); if (err != DB_SUCCESS) { pcur.close(); @@ -3057,11 +3048,6 @@ load_next_index: if (sec_index != nullptr) { mtr_start(&mtr); - /* Switch to scan index on REF_NAME, fk_max_recusive_level - already been updated when scanning FOR_NAME index, no need to - update again */ - check_recursive = false; - goto start_load; } diff --git a/storage/innobase/include/dict0load.h b/storage/innobase/include/dict0load.h index 533825ff8dd..2a1ddce055d 100644 --- a/storage/innobase/include/dict0load.h +++ b/storage/innobase/include/dict0load.h @@ -136,9 +136,6 @@ void dict_load_sys_table(dict_table_t *table); /*!< in: system table */ const char *table_name, /*!< in: table name */ const char **col_names, /*!< in: column names, or NULL to use table->col_names */ - bool check_recursive, /*!< in: Whether to check - recursive load of tables - chained by FK */ bool check_charsets, /*!< in: whether to check charset compatibility */ dict_err_ignore_t ignore_err, /*!< in: error to be ignored */