Merge 'simulator: reopen database with mvcc and indexes when necessary' from Pedro Muniz

Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #3503
This commit is contained in:
Pekka Enberg
2025-10-01 19:15:53 +03:00
committed by GitHub

View File

@@ -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) => {