diff options
author | heikki@hundin.mysql.fi <> | 2004-12-27 17:19:27 +0200 |
---|---|---|
committer | heikki@hundin.mysql.fi <> | 2004-12-27 17:19:27 +0200 |
commit | 3595bcd72e6e16c643390176f60eaad95683caaa (patch) | |
tree | 6280cd0f7c0198262f4b03a419500cfb451e9012 /innobase/row/row0mysql.c | |
parent | fbc96c79a1126344b6b48d9ace1e3e59a4650518 (diff) | |
parent | b8d576d087abbaf8075adb8936d505d0afd872f2 (diff) | |
download | mariadb-git-3595bcd72e6e16c643390176f60eaad95683caaa.tar.gz |
Merge hundin.mysql.fi:/home/heikki/mysql-4.0
into hundin.mysql.fi:/home/heikki/mysql-4.1
Diffstat (limited to 'innobase/row/row0mysql.c')
-rw-r--r-- | innobase/row/row0mysql.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c index e887079e025..47f1f4c444c 100644 --- a/innobase/row/row0mysql.c +++ b/innobase/row/row0mysql.c @@ -1833,6 +1833,12 @@ row_drop_table_for_mysql_in_background( trx = trx_allocate_for_background(); + /* If the original transaction was dropping a table referenced by + foreign keys, we must set the following to be able to drop the + table: */ + + trx->check_foreigns = FALSE; + /* fputs("InnoDB: Error: Dropping table ", stderr); ut_print_name(stderr, name); fputs(" in background drop list\n", stderr); */ @@ -1906,16 +1912,16 @@ loop: goto already_dropped; } - - if (table->n_mysql_handles_opened > 0 - || table->n_foreign_key_checks_running > 0) { + + if (DB_SUCCESS != row_drop_table_for_mysql_in_background( + drop->table_name)) { + /* If the DROP fails for some table, we return, and let the + main thread retry later */ return(n_tables + n_tables_dropped); } n_tables_dropped++; - - row_drop_table_for_mysql_in_background(drop->table_name); already_dropped: mutex_enter(&kernel_mutex); |