From 590f90ad9a2d16a5afaa7d24bf7f97b46d9f4fde Mon Sep 17 00:00:00 2001 From: Diego Reis Date: Sun, 16 Mar 2025 15:35:49 -0300 Subject: [PATCH] Fix `AutoCommit` handling of an ongoing halt checkpoint --- core/vdbe/mod.rs | 4 ++++ testing/all.test | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/vdbe/mod.rs b/core/vdbe/mod.rs index 7621146d6..af3349a55 100644 --- a/core/vdbe/mod.rs +++ b/core/vdbe/mod.rs @@ -1275,6 +1275,10 @@ impl Program { rollback, } => { let conn = self.connection.upgrade().unwrap(); + if matches!(state.halt_state, Some(HaltState::Checkpointing)) { + return self.halt(pager, state, mv_store); + } + if *auto_commit != *conn.auto_commit.borrow() { if *rollback { todo!("Rollback is not implemented"); diff --git a/testing/all.test b/testing/all.test index 42aadd038..5119b8eb0 100755 --- a/testing/all.test +++ b/testing/all.test @@ -25,5 +25,4 @@ source $testdir/changes.test source $testdir/total-changes.test source $testdir/offset.test source $testdir/scalar-functions-printf.test -# Disabled until https://github.com/tursodatabase/limbo/issues/1004 is fixed -# source $testdir/transactions.test +source $testdir/transactions.test