From 97657a86b3baa0c7b6d2908d66d024fc6ba82529 Mon Sep 17 00:00:00 2001 From: Jussi Saurio Date: Tue, 19 Aug 2025 12:33:17 +0300 Subject: [PATCH] Do not assume error message content in FaultyQuery --- simulator/generation/plan.rs | 3 +++ simulator/generation/property.rs | 11 ++++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/simulator/generation/plan.rs b/simulator/generation/plan.rs index eae39d4d1..c27becad5 100644 --- a/simulator/generation/plan.rs +++ b/simulator/generation/plan.rs @@ -645,6 +645,9 @@ impl Interaction { &query_str[0..query_str.len().min(4096)], err ); + if let Some(turso_core::LimboError::ParseError(e)) = err { + panic!("Unexpected parse error: {e}"); + } return Err(err.unwrap()); } let mut rows = rows.unwrap().unwrap(); diff --git a/simulator/generation/property.rs b/simulator/generation/property.rs index 6a0237509..4725aa384 100644 --- a/simulator/generation/property.rs +++ b/simulator/generation/property.rs @@ -16,7 +16,6 @@ use crate::{ Create, Delete, Drop, Insert, Query, Select, }, table::SimValue, - FAULT_ERROR_MSG, }, runner::env::SimulatorEnv, }; @@ -752,12 +751,10 @@ impl Property { Ok(Ok(())) } Err(err) => { - let msg = format!("{err}"); - if msg.contains(FAULT_ERROR_MSG) { - Ok(Ok(())) - } else { - Err(LimboError::InternalError(msg)) - } + // We cannot make any assumptions about the error content; all we are about is, if the statement errored, + // we don't shadow the results into the simulator env, i.e. we assume whatever the statement did was rolled back. + tracing::error!("Fault injection produced error: {err}"); + Ok(Ok(())) } } }),