From 455f0fbc461a4fa222b9387da34482af26e8fd9f Mon Sep 17 00:00:00 2001 From: Jussi Saurio Date: Thu, 16 Oct 2025 15:53:58 +0300 Subject: [PATCH] Set in_progress to false AFTER executing the statement --- bindings/rust/src/transaction.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/rust/src/transaction.rs b/bindings/rust/src/transaction.rs index 9780856a5..c265a0de8 100644 --- a/bindings/rust/src/transaction.rs +++ b/bindings/rust/src/transaction.rs @@ -126,8 +126,8 @@ impl Transaction<'_> { #[inline] async fn _commit(&mut self) -> Result<()> { - self.in_progress = false; self.conn.execute("COMMIT", ()).await?; + self.in_progress = false; Ok(()) } @@ -139,8 +139,8 @@ impl Transaction<'_> { #[inline] async fn _rollback(&mut self) -> Result<()> { - self.in_progress = false; self.conn.execute("ROLLBACK", ()).await?; + self.in_progress = false; Ok(()) }