From 7c86e7b9c426cb63dcc09f42ed93261fef848c30 Mon Sep 17 00:00:00 2001 From: Jussi Saurio Date: Thu, 25 Sep 2025 08:20:16 +0300 Subject: [PATCH] merge conflicts with atomics PRs --- core/mvcc/database/mod.rs | 4 ++-- core/vdbe/execute.rs | 8 -------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/core/mvcc/database/mod.rs b/core/mvcc/database/mod.rs index 9e32ef3a3..8305a9088 100644 --- a/core/mvcc/database/mod.rs +++ b/core/mvcc/database/mod.rs @@ -1357,11 +1357,11 @@ impl MvStore { } } - if connection.schema.borrow().schema_version + if connection.schema.read().schema_version > connection.db.schema.lock().unwrap().schema_version { // Connection made schema changes during tx and rolled back -> revert connection-local schema. - connection.schema.replace(connection.db.clone_schema()?); + *connection.schema.write() = connection.db.clone_schema()?; } let tx = tx_unlocked.value(); diff --git a/core/vdbe/execute.rs b/core/vdbe/execute.rs index 2cabd2879..b658bf506 100644 --- a/core/vdbe/execute.rs +++ b/core/vdbe/execute.rs @@ -2282,14 +2282,6 @@ pub fn op_transaction_inner( // Programs can run Transaction twice, first with read flag and then with write flag. So a single txid is enough // for both. if program.connection.mv_tx.get().is_none() { - // We allocate the first page lazily in the first transaction. - // TODO: when we fix MVCC enable schema cookie detection for reprepare statements - // let header_schema_cookie = pager - // .io - // .block(|| pager.with_header(|header| header.schema_cookie.get()))?; - // if header_schema_cookie != *schema_cookie { - // return Err(LimboError::SchemaUpdated); - // } let tx_id = match tx_mode { TransactionMode::None | TransactionMode::Read