summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2001-11-07 23:18:34 +0200
committermonty@hundin.mysql.fi <>2001-11-07 23:18:34 +0200
commit0798c70cd18166b4a33c3ca394736098bfce983a (patch)
tree30d742f4b5c6202f5ebf0db1d0eaa1c442c9f6ab /sql
parent28696843640ed50e3de2ea33d6459922ffa101a4 (diff)
parent1bc03e8b172102c4198cefadeda1ac49379ea19c (diff)
downloadmariadb-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.cc6
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))