I need to know when a commit or a rollback is executed, I know that I
can use the sqlite_commit_hook routine to be notified of a commit
command, but what about rollback?
Is there a way to know (or to be notified) when a rollback happens?
i didn't check cvstrack
Many thanks !
D. Richard Hipp wrote:
>On Thu, 2005-07-28 at 08:37 +0200, Nicolas Martin wrote:
>>Some strange effect of the round expression :
>>sqlite> select round(1-0.5);
>>sqlite> select round(2-0.5);
>See http://www.sqlite.org/cvstrac/tktview?tn=1316. The
>problem results from inconsistent behavior in platform
>printf() functions. The fix was for SQLite to always use
>it's own internal printf() function.
And i wish for a test if the transaction is already set or not, without
using a callback.
Even better, nested tranactions would be the best.
----- Original Message -----
From: "Marco Bambini" <[hidden email]>
To: <[hidden email]>
Sent: Thursday, July 28, 2005 9:24 AM
Subject: [sqlite] Commit and Rollback
>I need to know when a commit or a rollback is executed, I know that I can
>use the sqlite_commit_hook routine to be notified of a commit command, but
>what about rollback?
> Is there a way to know (or to be notified) when a rollback happens?
> Thanks a lot for your help,
> Marco Bambini
On Jul 28, 2005, at 4:29 AM, Edwin Knoppert wrote:
> And i wish for a test if the transaction is already set or not,
> without using a callback.
You already can:
Test to see whether or not the database connection is in autocommit
mode. Return TRUE if it is and FALSE if not. Autocommit mode is on by
default. Autocommit is disabled by a BEGIN statement and reenabled by
the next COMMIT or ROLLBACK.