> Date: Tue, 6 May 2014 14:57:30 +0200
> From: Mark Lawrence <no...@null.net>
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] transactions do not respect delete
> Message-ID: <20140506125730.ga23...@rekudos.net>
> Content-Type: text/plain; charset=us-ascii
>
> > It would appear the DELETE was successful, and the first INSERT was
> > successful. But when the second INSERT failed (as it was intended
to)..it
> > did not ROLLBACK the database.
>
> Even though the second INSERT fails, your script still calls COMMIT
> on an open transaction in which the DELETE and first INSERT have
> succeeded.

You are exactly correct (sound of palm slapping my own face).

I was working on a proof of concept using the sqlite command-line shell, and
completely forget the fact that in code, we'd get an exception when we
attempted the second INSERT, at which point it would be up to us to either
invoke COMMIT or ROLLBACK.

Sorry for the foolishness

Jim




_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to