mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 11:01:52 +01:00
acebe35719
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. |
||
---|---|---|
.. | ||
archive | ||
blackhole | ||
columnstore | ||
connect | ||
csv | ||
example | ||
federated | ||
federatedx | ||
heap | ||
innobase | ||
maria | ||
mroonga | ||
myisam | ||
myisammrg | ||
oqgraph | ||
perfschema | ||
rocksdb | ||
sequence | ||
sphinx | ||
spider | ||
test_sql_discovery |