mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge branch '5.5' into 10.0
This commit is contained in:
@ -1094,13 +1094,20 @@ bool close_temporary_tables(THD *thd)
|
||||
DBUG_RETURN(FALSE);
|
||||
DBUG_ASSERT(!thd->rgi_slave);
|
||||
|
||||
/*
|
||||
Ensure we don't have open HANDLERs for tables we are about to close.
|
||||
This is necessary when close_temporary_tables() is called as part
|
||||
of execution of BINLOG statement (e.g. for format description event).
|
||||
*/
|
||||
mysql_ha_rm_temporary_tables(thd);
|
||||
if (!mysql_bin_log.is_open())
|
||||
{
|
||||
TABLE *tmp_next;
|
||||
for (table= thd->temporary_tables; table; table= tmp_next)
|
||||
for (TABLE *t= thd->temporary_tables; t; t= tmp_next)
|
||||
{
|
||||
tmp_next= table->next;
|
||||
close_temporary(table, 1, 1);
|
||||
tmp_next= t->next;
|
||||
mysql_lock_remove(thd, thd->lock, t);
|
||||
close_temporary(t, 1, 1);
|
||||
}
|
||||
thd->temporary_tables= 0;
|
||||
DBUG_RETURN(FALSE);
|
||||
@ -1196,6 +1203,7 @@ bool close_temporary_tables(THD *thd)
|
||||
strlen(table->s->table_name.str));
|
||||
s_query.append(',');
|
||||
next= table->next;
|
||||
mysql_lock_remove(thd, thd->lock, table);
|
||||
close_temporary(table, 1, 1);
|
||||
}
|
||||
thd->clear_error();
|
||||
|
Reference in New Issue
Block a user