summaryrefslogtreecommitdiff
path: root/sql/lock.cc
diff options
context:
space:
mode:
authormsvensson@pilot.(none) <>2007-09-27 08:49:23 +0200
committermsvensson@pilot.(none) <>2007-09-27 08:49:23 +0200
commit2a1e556081fdf0ad44fe1f410ca7bb6eae52fc16 (patch)
tree28d2f4ca6c05befb654ea30f9548ff44229edc5f /sql/lock.cc
parente21bb2640aad40e766328b2016d7c68496113559 (diff)
parenta3c5169d0da9038182c8a91aee4abd88d72f0e07 (diff)
downloadmariadb-git-2a1e556081fdf0ad44fe1f410ca7bb6eae52fc16.tar.gz
Merge bk-internal:/home/bk/mysql-5.0-maint
into pilot.(none):/data/msvensson/mysql/mysql-5.0-maint
Diffstat (limited to 'sql/lock.cc')
-rw-r--r--sql/lock.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/lock.cc b/sql/lock.cc
index 0036d0aef77..cf06be5f95f 100644
--- a/sql/lock.cc
+++ b/sql/lock.cc
@@ -172,6 +172,8 @@ MYSQL_LOCK *mysql_lock_tables(THD *thd, TABLE **tables, uint count,
thd->lock_id)];
if (rc > 1) /* a timeout or a deadlock */
{
+ if (sql_lock->table_count)
+ VOID(unlock_external(thd, sql_lock->table, sql_lock->table_count));
my_error(rc, MYF(0));
my_free((gptr) sql_lock,MYF(0));
sql_lock= 0;