diff options
author | unknown <monty@hundin.mysql.fi> | 2001-11-07 23:18:34 +0200 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-11-07 23:18:34 +0200 |
commit | bc1ea614671d2b16696c9b5a666ff6f5a1039428 (patch) | |
tree | 30d742f4b5c6202f5ebf0db1d0eaa1c442c9f6ab /sql | |
parent | 1119e844b71f4ad8122854c371807819986ce2c0 (diff) | |
parent | e85894c182f4c131b961f87b0392beead3d43a19 (diff) | |
download | mariadb-git-bc1ea614671d2b16696c9b5a666ff6f5a1039428.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)) |