summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-11-07 23:18:12 +0200
committerunknown <monty@hundin.mysql.fi>2001-11-07 23:18:12 +0200
commite85894c182f4c131b961f87b0392beead3d43a19 (patch)
treef1c68494d0547ce79f742d6afdbb72452885ec00 /sql/sql_table.cc
parent3c0487c4c31c516c745a020f2c1b2e836cb28d86 (diff)
downloadmariadb-git-e85894c182f4c131b961f87b0392beead3d43a19.tar.gz
Fix bug in ALTER TABLE on a TEMPORARY InnoDB table.
Docs/manual.texi: Changelog mysql-test/mysql-test-run.sh: Change shutdown to 20 seconds for slow systems mysql-test/r/innodb.result: Testcase for found bug mysql-test/t/innodb.test: Testcase for found bug
Diffstat (limited to 'sql/sql_table.cc')
-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))