GNU bug report logs - #67142
29.1; with-sqlite-transaction commits on exception rather than rolling back

Previous Next

Package: emacs;

Reported by: Vasilij Schneidermann <mail <at> vasilij.de>

Date: Mon, 13 Nov 2023 00:49:01 UTC

Severity: normal

Found in version 29.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 67142 <at> debbugs.gnu.org (full text, mbox):

From: Vasilij Schneidermann <mail <at> vasilij.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 67142 <at> debbugs.gnu.org
Subject: Re: bug#67142: 29.1; with-sqlite-transaction commits on exception
 rather than rolling back
Date: Thu, 16 Nov 2023 21:25:53 +0100
[Message part 1 (text/plain, inline)]
> 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).
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 1 year and 72 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.