diff options
Diffstat (limited to 'sql/lock.cc')
-rw-r--r-- | sql/lock.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/lock.cc b/sql/lock.cc index a0d6faa6604..bb1c2c46284 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -34,8 +34,8 @@ This is followed by a call to thr_multi_lock() for all tables. - When statement is done, we call mysql_unlock_tables(). - This will call thr_multi_unlock() followed by - table_handler->external_lock(thd, F_UNLCK) for each table. + table_handler->external_lock(thd, F_UNLCK) followed by + thr_multi_unlock() for each table. - Note that mysql_unlock_tables() may be called several times as MySQL in some cases can free some tables earlier than others. @@ -385,10 +385,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((uchar*) sql_lock,MYF(0)); DBUG_VOID_RETURN; } |