Skip to content

Commit ab3388c

Browse files
committed
bugfix: mutex order violation in embedded
safe_mutex: Found wrong usage of mutex 'LOCK_thread_count' and 'LOCK_status' Mutex currently locked (in reverse order): LOCK_status sql/sql_class.h line 3873 LOCK_thread_count libmysqld/lib_sql.cc line 432
1 parent 1282eb6 commit ab3388c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libmysqld/lib_sql.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,8 @@ static void emb_free_embedded_thd(MYSQL *mysql)
434434
thread_count--;
435435
thd->store_globals();
436436
thd->unlink();
437-
delete thd;
438437
mysql_mutex_unlock(&LOCK_thread_count);
438+
delete thd;
439439
my_pthread_setspecific_ptr(THR_THD, 0);
440440
mysql->thd=0;
441441
}

0 commit comments

Comments
 (0)