From b624e449bc284cb31bab9d35bd46788de39da6e7 Mon Sep 17 00:00:00 2001 From: pedrocarlo Date: Wed, 1 Oct 2025 11:36:13 -0300 Subject: [PATCH] simulator: reopen database with mvcc when necessary --- simulator/generation/plan.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/simulator/generation/plan.rs b/simulator/generation/plan.rs index 25edf404c..1f164a01d 100644 --- a/simulator/generation/plan.rs +++ b/simulator/generation/plan.rs @@ -1014,6 +1014,8 @@ impl InteractionType { fn reopen_database(env: &mut SimulatorEnv) { // 1. Close all connections without default checkpoint-on-close behavior // to expose bugs related to how we handle WAL + let mvcc = env.profile.experimental_mvcc; + let indexes = env.profile.query.gen_opts.indexes; let num_conns = env.connections.len(); env.connections.clear(); @@ -1036,8 +1038,8 @@ fn reopen_database(env: &mut SimulatorEnv) { let db = match turso_core::Database::open_file( env.io.clone(), env.get_db_path().to_str().expect("path should be 'to_str'"), - false, - true, + mvcc, + indexes, ) { Ok(db) => db, Err(e) => {