mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 23:04:20 +01:00
branches/zip: When assigning lock->recursive = FALSE, also flag
lock->writer_thread invalid, so that Valgrind will catch more errors. This is related to Issue #175.
This commit is contained in:
parent
a5d1b1cee7
commit
a5304a28a8
1 changed files with 4 additions and 0 deletions
|
@ -574,6 +574,8 @@ rw_lock_x_unlock_func(
|
||||||
if (lock->lock_word == 0) {
|
if (lock->lock_word == 0) {
|
||||||
/* Last caller in a possible recursive chain. */
|
/* Last caller in a possible recursive chain. */
|
||||||
lock->recursive = FALSE;
|
lock->recursive = FALSE;
|
||||||
|
UNIV_MEM_INVALID(&lock->writer_thread,
|
||||||
|
sizeof lock->writer_thread);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UNIV_SYNC_DEBUG
|
#ifdef UNIV_SYNC_DEBUG
|
||||||
|
@ -618,6 +620,8 @@ rw_lock_x_unlock_direct(
|
||||||
|
|
||||||
if (lock->lock_word == 0) {
|
if (lock->lock_word == 0) {
|
||||||
lock->recursive = FALSE;
|
lock->recursive = FALSE;
|
||||||
|
UNIV_MEM_INVALID(&lock->writer_thread,
|
||||||
|
sizeof lock->writer_thread);
|
||||||
}
|
}
|
||||||
|
|
||||||
lock->lock_word += X_LOCK_DECR;
|
lock->lock_word += X_LOCK_DECR;
|
||||||
|
|
Loading…
Add table
Reference in a new issue