diff options
author | monty@hundin.mysql.fi <> | 2001-11-07 23:18:34 +0200 |
---|---|---|
committer | monty@hundin.mysql.fi <> | 2001-11-07 23:18:34 +0200 |
commit | 0798c70cd18166b4a33c3ca394736098bfce983a (patch) | |
tree | 30d742f4b5c6202f5ebf0db1d0eaa1c442c9f6ab /sql | |
parent | 28696843640ed50e3de2ea33d6459922ffa101a4 (diff) | |
parent | 1bc03e8b172102c4198cefadeda1ac49379ea19c (diff) | |
download | mariadb-git-0798c70cd18166b4a33c3ca394736098bfce983a.tar.gz |
Merge work:/home/bk/mysql into hundin.mysql.fi:/my/bk/mysql
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)) |