summaryrefslogtreecommitdiff
path: root/sql/lock.cc
diff options
context:
space:
mode:
authorunknown <serg@janus.mylan>2007-07-04 22:27:58 +0200
committerunknown <serg@janus.mylan>2007-07-04 22:27:58 +0200
commit7f62d8121f28f33c730f449e34146725dc68a31f (patch)
treee561d554668cb480f1eb87c4430151f7cce55469 /sql/lock.cc
parentff3e4bd97adc36ae2353ddfe2fcc5fefaa5d02e8 (diff)
downloadmariadb-git-7f62d8121f28f33c730f449e34146725dc68a31f.tar.gz
in mysql_unlock_tables(), do thr_unlock() AFTER external_unlock().
it means, {update,restore}_status() should be called in external_lock, not in thr_unlock. Only affects storage engines that support TL_WRITE_CONCURRENT.
Diffstat (limited to 'sql/lock.cc')
-rw-r--r--sql/lock.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/lock.cc b/sql/lock.cc
index edef3b3b67f..93d88320bb7 100644
--- a/sql/lock.cc
+++ b/sql/lock.cc
@@ -281,10 +281,10 @@ static int lock_external(THD *thd, TABLE **tables, uint count)
void mysql_unlock_tables(THD *thd, MYSQL_LOCK *sql_lock)
{
DBUG_ENTER("mysql_unlock_tables");
- if (sql_lock->lock_count)
- thr_multi_unlock(sql_lock->locks,sql_lock->lock_count);
if (sql_lock->table_count)
VOID(unlock_external(thd,sql_lock->table,sql_lock->table_count));
+ if (sql_lock->lock_count)
+ thr_multi_unlock(sql_lock->locks,sql_lock->lock_count);
my_free((gptr) sql_lock,MYF(0));
DBUG_VOID_RETURN;
}