mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-26 20:44:23 +01:00
Closes #3748 Right now if any error happens during an interactive tx that causes the `Transaction` to drop, the program will panic. To prevent this, we store the `DropBehavior` of the transaction on the `Connection` when it drops and issue the corresponding action (ROLLBACK / COMMIT / IGNORE / PANIC) the next time `Connection` is used to access the database. This defaults to `IGNORE`. I don't know how good this solution is, but we can at least prevent a panic by storing whether the connection has a dangling transaction and roll it back automatically the next time the connection tries to do something. Reviewed-by: Preston Thorpe <preston@turso.tech> Closes #3750