summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <marko@hundin.mysql.fi>2005-05-26 15:42:24 +0300
committerunknown <marko@hundin.mysql.fi>2005-05-26 15:42:24 +0300
commit9181c17c143063bd2714c6524772f5b10d412844 (patch)
tree27fbf0a51dcd293011336514cd2bd74ea3393ea2
parentdae940d11e2c890d12352e861b45593dbebe36d6 (diff)
downloadmariadb-git-9181c17c143063bd2714c6524772f5b10d412844.tar.gz
InnoDB: Check all referencing tables in DROP DATABASE (Bug #10335).
innobase/row/row0mysql.c: row_drop_table_for_mysql(): Check all referencing tables when drop_db==TRUE (Bug #10335)
-rw-r--r--innobase/row/row0mysql.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c
index a915200161f..86557315b71 100644
--- a/innobase/row/row0mysql.c
+++ b/innobase/row/row0mysql.c
@@ -2143,6 +2143,7 @@ row_drop_table_for_mysql(
foreign = UT_LIST_GET_FIRST(table->referenced_list);
while (foreign && foreign->foreign_table == table) {
+ check_next_foreign:
foreign = UT_LIST_GET_NEXT(referenced_list, foreign);
}
@@ -2171,6 +2172,10 @@ row_drop_table_for_mysql(
goto funct_exit;
}
+ if (foreign && trx->check_foreigns) {
+ goto check_next_foreign;
+ }
+
if (table->n_mysql_handles_opened > 0) {
ibool added;