From 2d5b96798fe3125e77bf214c2c189d66dd309cfd Mon Sep 17 00:00:00 2001 From: "marko@hundin.mysql.fi" <> Date: Thu, 26 May 2005 15:42:24 +0300 Subject: [PATCH] InnoDB: Check all referencing tables in DROP DATABASE (Bug #10335). --- innobase/row/row0mysql.c | 5 +++++ 1 file changed, 5 insertions(+) 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;