1
0
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:
monty@hundin.mysql.fi
2001-11-07 23:18:12 +02:00
parent af2e13481e
commit 1bc03e8b17
5 changed files with 16 additions and 3 deletions

View File

@ -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))