mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Avoiding a theoretically possible crash (pthread_mutex_lock(0)) which could (at least in POSIX Threads books)
happen on SMP machines, when a thread is going to wait on a condition and it is KILLed at the same time. Cleaning code a bit by adding a test in enter_cond() that we have the mutex (was already the case in all places where it's called except one which is fixed here).
This commit is contained in:
@ -539,6 +539,7 @@ public:
|
||||
const char* msg)
|
||||
{
|
||||
const char* old_msg = proc_info;
|
||||
safe_mutex_assert_owner(mutex);
|
||||
mysys_var->current_mutex = mutex;
|
||||
mysys_var->current_cond = cond;
|
||||
proc_info = msg;
|
||||
|
Reference in New Issue
Block a user