Skip to content

Commit

Permalink
bugfix: mutex order violation in embedded
Browse files Browse the repository at this point in the history
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
  • Loading branch information
vuvova committed Jan 15, 2017
1 parent 1282eb6 commit ab3388c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libmysqld/lib_sql.cc
Expand Up @@ -434,8 +434,8 @@ static void emb_free_embedded_thd(MYSQL *mysql)
thread_count--;
thd->store_globals();
thd->unlink();
delete thd;
mysql_mutex_unlock(&LOCK_thread_count);
delete thd;
my_pthread_setspecific_ptr(THR_THD, 0);
mysql->thd=0;
}
Expand Down

0 comments on commit ab3388c

Please sign in to comment.