From fcdc76c28952608524d6e5a388bc7b04ad8de09f Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 Jul 2007 22:27:58 +0200 Subject: 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. --- sql/lock.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sql/lock.cc') 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; } -- cgit v1.2.1