bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#67142: 29.1; with-sqlite-transaction commits on exception rather tha


From: Vasilij Schneidermann
Subject: bug#67142: 29.1; with-sqlite-transaction commits on exception rather than rolling back
Date: Thu, 16 Nov 2023 21:25:53 +0100

> Does the change below look correct?  (I'm not an expert on SQLite or
> DB programming in general.)

The `unwind-protect` part does not look correct since the rollback is
always performed, even after the body form completed successfully and a
commit was done. Either a commit or a rollback should be done, not both.
Perhaps `condition-case` would be the better option, but then the error
would need to be re-raised after doing the rollback...

A minor mistake is the result variable not using an uninterned symbol
(or alternatively, `prog1` could replace the use of the result variable).

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]