diff options
author | monty@hundin.mysql.fi <> | 2001-11-07 23:18:12 +0200 |
---|---|---|
committer | monty@hundin.mysql.fi <> | 2001-11-07 23:18:12 +0200 |
commit | 1bc03e8b172102c4198cefadeda1ac49379ea19c (patch) | |
tree | f1c68494d0547ce79f742d6afdbb72452885ec00 /sql | |
parent | af2e13481ecc4dbae74fa5a4dc4f9d70ec498e39 (diff) | |
download | mariadb-git-1bc03e8b172102c4198cefadeda1ac49379ea19c.tar.gz |
Fix bug in ALTER TABLE on a TEMPORARY InnoDB table.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_table.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index cf788cee05f..725aed390be 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -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)) |