MDEV-37215 SELECT FOR UPDATE crash in SERIALIZABLE

ha_innobase::store_lock(): Set also trx->will_lock when starting
a transaction at SERIALIZABLE isolation level. This fixes up
commit 7fbbbc983f (MDEV-36330).
This commit is contained in:
Marko Mäkelä 2025-07-14 10:31:56 +03:00
commit b7b2e009b3
3 changed files with 20 additions and 0 deletions

View file

@ -16510,6 +16510,7 @@ ha_innobase::store_lock(
case ISO_SERIALIZABLE:
auto trx_state = trx->state;
if (trx_state == TRX_STATE_NOT_STARTED) {
trx->will_lock = true;
trx_start_if_not_started(trx, false);
trx->read_view.open(trx);
} else {