mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
continue DROP TEMPORARY TABLE t1, t2, t3 after error.
normal DROP TABLE with many tables continues after an error, trying to drop as many tables as possible. But DROP TEMPORARY TABLE was aborting on the first error. Change it to behave as DROP TABLE does.
This commit is contained in:
@ -2338,17 +2338,12 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists,
|
||||
{
|
||||
table_creation_was_logged= table->table->s->table_creation_was_logged;
|
||||
if (thd->drop_temporary_table(table->table, &is_trans, true))
|
||||
{
|
||||
/*
|
||||
This is a very unlikely scenaro as dropping a temporary table
|
||||
should always work. Would be better if we tried to drop all
|
||||
temporary tables before giving the error.
|
||||
*/
|
||||
error= 1;
|
||||
goto err;
|
||||
else
|
||||
{
|
||||
table->table= 0;
|
||||
temporary_table_was_dropped= 1;
|
||||
}
|
||||
table->table= 0;
|
||||
temporary_table_was_dropped= 1;
|
||||
}
|
||||
|
||||
if ((drop_temporary && if_exists) || temporary_table_was_dropped)
|
||||
|
Reference in New Issue
Block a user