Bug#16333 Assertion failure in lock.cc in the sysbench test
- Set the value of mp->thread before mp->count to avoid race condition. mysys/thr_mutex.c: Set mp->thread before mp->count is changed. Since mp->count is used in the macros 'safe_mutex_assert_not_owner' and 'safe_mutex_assert_owner' as an inidicator wheter to look at the mp->thread variable or not. This means that when mp->count is changed, the mp->thread should akready be set to the owning thread. Also set mp->thread to 0 when unlocking the mutex.
Showing
Please register or sign in to comment