Commit 9181c17c authored by unknown's avatar unknown
Browse files

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)
parent dae940d1
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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;