Do not assume error message content in FaultyQuery

This commit is contained in:
Jussi Saurio
2025-08-19 12:33:17 +03:00
parent 91cf63215f
commit 97657a86b3
2 changed files with 7 additions and 7 deletions

View File

@@ -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();

View File

@@ -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(()))
}
}
}),