mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fix bug in ALTER TABLE on a TEMPORARY InnoDB table.
This commit is contained in:
@ -1509,6 +1509,12 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
|
||||
my_free((gptr) new_table,MYF(0));
|
||||
goto err;
|
||||
}
|
||||
/* Close lock if this is a transactional table */
|
||||
if (thd->lock)
|
||||
{
|
||||
mysql_unlock_tables(thd, thd->lock);
|
||||
thd->lock=0;
|
||||
}
|
||||
/* Remove link to old table and rename the new one */
|
||||
close_temporary_table(thd,table->table_cache_key,table_name);
|
||||
if (rename_temporary_table(thd, new_table, new_db, new_name))
|
||||
|
Reference in New Issue
Block a user