mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-18 17:14:20 +01:00
fix non-determinism bug arising from a call to thread_rng while picking
which row to check existence for in the result of the select query
This commit is contained in:
@@ -218,7 +218,7 @@ fn main() -> Result<(), String> {
|
||||
last_execution,
|
||||
);
|
||||
|
||||
match (shrunk, &result) {
|
||||
match (&shrunk, &result) {
|
||||
(
|
||||
SandboxedResult::Panicked { error: e1, .. },
|
||||
SandboxedResult::Panicked { error: e2, .. },
|
||||
@@ -227,7 +227,7 @@ fn main() -> Result<(), String> {
|
||||
SandboxedResult::FoundBug { error: e1, .. },
|
||||
SandboxedResult::FoundBug { error: e2, .. },
|
||||
) => {
|
||||
if &e1 != e2 {
|
||||
if e1 != e2 {
|
||||
log::error!(
|
||||
"shrinking failed, the error was not properly reproduced"
|
||||
);
|
||||
@@ -291,6 +291,7 @@ fn revert_db_and_plan_files(output_dir: &Path) {
|
||||
std::fs::rename(&new_plan_path, &old_plan_path).unwrap();
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
enum SandboxedResult {
|
||||
Panicked {
|
||||
error: String,
|
||||
|
||||
Reference in New Issue
Block a user