From fd5e73f038a571ea1da7892168e5732e928d2ffa Mon Sep 17 00:00:00 2001 From: Jussi Saurio Date: Wed, 30 Jul 2025 13:47:52 +0300 Subject: [PATCH] op_transaction: read tx must be ended in all cases if begin_write_tx fails --- core/vdbe/execute.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/core/vdbe/execute.rs b/core/vdbe/execute.rs index d88351b46..8f211c482 100644 --- a/core/vdbe/execute.rs +++ b/core/vdbe/execute.rs @@ -2030,12 +2030,7 @@ pub fn op_transaction( match pager.begin_write_tx()? { IOResult::Done(r) => { if let LimboResult::Busy = r { - if matches!( - current_state, - TransactionState::Read | TransactionState::PendingUpgrade - ) { - pager.end_read_tx()?; - } + pager.end_read_tx()?; conn.transaction_state.replace(TransactionState::None); conn.auto_commit.replace(true); return Ok(InsnFunctionStepResult::Busy);