Commit b0c7b430 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-29440 fixup: Clean up dict_load_foreigns()

dict_load_foreigns(): Remove the constant parameter uncommitted=false.
The parameter only had to be added to dict_load_foreign().

Spotted by Alexey Midenkov
parent fe449aff
......@@ -2495,7 +2495,7 @@ static dict_table_t *dict_load_table_one(const span<const char> &name,
if (!table->is_readable()) {
/* Don't attempt to load the indexes from disk. */
} else if (err == DB_SUCCESS) {
err = dict_load_foreigns(table->name.m_name, nullptr, false,
err = dict_load_foreigns(table->name.m_name, nullptr,
0, true, ignore_err, fk_tables);
if (err != DB_SUCCESS) {
......@@ -3045,8 +3045,6 @@ 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 uncommitted, /*!< in: use READ UNCOMMITTED
transaction isolation level */
trx_id_t trx_id, /*!< in: DDL transaction id,
or 0 to check
recursive load of tables
......@@ -3161,7 +3159,7 @@ dict_load_foreigns(
/* Load the foreign constraint definition to the dictionary cache */
err = len < sizeof fk_id
? dict_load_foreign(table_name, uncommitted, col_names, trx_id,
? dict_load_foreign(table_name, false, col_names, trx_id,
check_recursive, check_charsets,
{fk_id, len}, ignore_err, fk_tables)
: DB_CORRUPTION;
......
......@@ -12826,7 +12826,7 @@ int create_table_info_t::create_table(bool create_fk)
if (err == DB_SUCCESS) {
/* Check that also referencing constraints are ok */
dict_names_t fk_tables;
err = dict_load_foreigns(m_table_name, nullptr, false,
err = dict_load_foreigns(m_table_name, nullptr,
m_trx->id, true,
DICT_ERR_IGNORE_NONE, fk_tables);
while (err == DB_SUCCESS && !fk_tables.empty()) {
......
......@@ -9881,7 +9881,7 @@ innobase_update_foreign_cache(
dict_names_t fk_tables;
err = dict_load_foreigns(user_table->name.m_name,
ctx->col_names, false, 1, true,
ctx->col_names, 1, true,
DICT_ERR_IGNORE_NONE,
fk_tables);
......@@ -9892,7 +9892,7 @@ innobase_update_foreign_cache(
loaded with "foreign_key checks" off,
so let's retry the loading with charset_check is off */
err = dict_load_foreigns(user_table->name.m_name,
ctx->col_names, false, 1, false,
ctx->col_names, 1, false,
DICT_ERR_IGNORE_NONE,
fk_tables);
......
......@@ -89,8 +89,6 @@ 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 uncommitted, /*!< in: use READ UNCOMMITTED
transaction isolation level */
trx_id_t trx_id, /*!< in: DDL transaction id,
or 0 to check
recursive load of tables
......
......@@ -2869,7 +2869,7 @@ row_rename_table_for_mysql(
dict_names_t fk_tables;
err = dict_load_foreigns(
new_name, nullptr, false, trx->id,
new_name, nullptr, trx->id,
!old_is_tmp || trx->check_foreigns,
use_fk
? DICT_ERR_IGNORE_NONE
......
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