mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-31523 Using two temporary tables in OPTIMIZE TABLE lead to crash
Fixed typo in mysql_admin_table which cused call of close_unused_temporary_table_instances alwas for the first table instead of the current table. Added ASSERT that close_unused_temporary_table_instances should not remove all instances of user created temporary table.
This commit is contained in:
@ -776,7 +776,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
|
||||
if (lock_type == TL_WRITE && table->mdl_request.type > MDL_SHARED_WRITE)
|
||||
{
|
||||
if (table->table->s->tmp_table)
|
||||
thd->close_unused_temporary_table_instances(tables);
|
||||
thd->close_unused_temporary_table_instances(table);
|
||||
else
|
||||
{
|
||||
if (wait_while_table_is_used(thd, table->table, HA_EXTRA_NOT_USED))
|
||||
|
Reference in New Issue
Block a user