mariadb/storage
Vlad Lesin acebe35719 MDEV-29635 race on trx->lock.wait_lock in deadlock resolution
Returning DB_SUCCESS unconditionally if !trx->lock.wait_lock in
lock_trx_handle_wait() is wrong. Because even if
trx->lock.was_chosen_as_deadlock_victim was not set before the first check
in lock_trx_handle_wait(), it can be set after
the check, and trx->lock.wait_lock can be reset by another thread from
lock_reset_lock_and_trx_wait() if the transaction was chosen as deadlock
victim. In this case lock_trx_handle_wait() will return DB_SUCCESS even
the transaction was marked as deadlock victim, and continue execution
instead of rolling back.

The fix is to check trx->lock.was_chosen_as_deadlock_victim once more if
trx->lock.wait_lock is reset, as trx->lock.wait_lock can be reset only
after trx->lock.was_chosen_as_deadlock_victim was set if the transaction
was chosen as deadlock victim.
2022-10-21 10:55:18 +03:00
..
archive Cleanup: Remove IF_VALGRIND 2022-04-25 09:40:40 +03:00
blackhole
columnstore columnstore-6.4.6-1 2022-10-20 18:55:09 +02:00
connect Merge branch '10.5' into 10.6 2022-10-02 22:14:21 +02:00
csv Merge branch 'bb-10.4-release' into bb-10.5-release 2021-02-15 16:43:15 +01:00
example Merge 10.4 into 10.5 2022-02-22 10:35:16 +03:00
federated Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
federatedx Merge branch '10.5' into 10.6 2022-10-02 22:14:21 +02:00
heap Merge 10.5 into 10.6 2022-07-27 17:52:37 +03:00
innobase MDEV-29635 race on trx->lock.wait_lock in deadlock resolution 2022-10-21 10:55:18 +03:00
maria Merge 10.5 into 10.6 2022-10-06 09:22:39 +03:00
mroonga Merge branch '10.5' into 10.6 2022-10-15 23:47:33 +02:00
myisam Merge branch '10.5' into 10.6 2022-10-15 23:47:33 +02:00
myisammrg Reduce usage of strlen() 2021-05-19 22:27:48 +02:00
oqgraph Merge 10.5 into 10.6 2022-01-18 12:59:50 +02:00
perfschema Merge branch '10.5' into bb-10.6-release 2022-08-03 12:19:59 +02:00
rocksdb maintainer mode: build with -Wmissing-braces 2022-10-05 18:22:39 +03:00
sequence Merge remote-tracking branch 'origin/10.4' into 10.5 2022-09-14 16:24:51 +04:00
sphinx MDEV-25602 get rid of __WIN__ in favor of standard _WIN32 2021-06-06 13:21:03 +02:00
spider Merge 10.5 into 10.6 2022-10-06 09:22:39 +03:00
test_sql_discovery Merge 10.5 into 10.6 2022-09-20 16:53:20 +03:00