mirror of
https://github.com/allankoechke/turso.git
synced 2026-11-30 11:12:58 +00:00
Parameterized batches could produce different effects across embedded and serverless drivers when a later bind value was invalid. Embedded Rust also allowed cloned connections to interleave work with a batch, and managed batches allowed transaction-control statements to escape their wrapper. Rollback failures were hidden, while serverless Rust could retain a stale last-insert rowid when COMMIT failed after a successful insert. Validate every batch input before execution, reject transaction-control SQL before opening a managed transaction, and hold an operation-wide gate for embedded Rust batches. Preserve both the primary and rollback errors, and carry successful statement rowids through serverless batch decoding even when a synthetic transaction step fails. Reject malformed serverless batch responses instead of treating incomplete transaction steps as success.