1
0
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:
guilhem@mysql.com
2004-07-30 00:53:25 +02:00
parent e5c2285782
commit 0f20e2fece
4 changed files with 13 additions and 2 deletions

View File

@ -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;