summaryrefslogtreecommitdiff
path: root/innobase/row/row0mysql.c
diff options
context:
space:
mode:
Diffstat (limited to 'innobase/row/row0mysql.c')
-rw-r--r--innobase/row/row0mysql.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c
index e2b34e6e3f1..9410f2ce7cc 100644
--- a/innobase/row/row0mysql.c
+++ b/innobase/row/row0mysql.c
@@ -1796,7 +1796,7 @@ row_table_add_foreign_constraints(
if (err == DB_SUCCESS) {
/* Check that also referencing constraints are ok */
- err = dict_load_foreigns(name);
+ err = dict_load_foreigns(name, trx->check_foreigns);
}
if (err != DB_SUCCESS) {
@@ -3204,6 +3204,8 @@ row_rename_table_for_mysql(
goto funct_exit;
}
+ err = dict_load_foreigns(new_name, trx->check_foreigns);
+
if (row_is_mysql_tmp_table_name(old_name)) {
/* MySQL is doing an ALTER TABLE command and it
@@ -3213,8 +3215,6 @@ row_rename_table_for_mysql(
table. But we want to load also the foreign key
constraint definitions for the original table name. */
- err = dict_load_foreigns(new_name);
-
if (err != DB_SUCCESS) {
ut_print_timestamp(stderr);
fputs(" InnoDB: Error: in ALTER TABLE ",
@@ -3233,8 +3233,6 @@ row_rename_table_for_mysql(
trx->error_state = DB_SUCCESS;
}
} else {
- err = dict_load_foreigns(new_name);
-
if (err != DB_SUCCESS) {
ut_print_timestamp(stderr);