Alright, thank you for these precisions.
On 08/13/2014 02:28 PM, Richard Hipp wrote:
On Tue, Aug 12, 2014 at 12:35 PM, Jean GIARD <jgi...@antidot.net> wrote:
I know it's not a good behavior to have structure queries inside a
transaction ...
There is absolutely nothing wrong with doing DDL statements inside a
transaction in SQLite. Other SQL database engines might have issues with
that, but not SQLite.
still is it expected for sqlite not to fail in this case ?
There is no expectation. The documentation merely says that you cannot
change the journal mode within a transaction. It doesn't say if the
attempt will generate an error or silently become a no-op. As it happens,
it depends on the circumstances. Running "BEGIN" does not actually "start"
a transaction - it just takes SQLite out of auto-commit mode. The
transaction doesn't start until the first write. Or you can start a
transaction right away using "BEGIN IMMEDIATE". If a transaction has
already started, "PRAGMA journal_mode=WAL" becomes a no-op. If SQLite is
out of auto-commit mode but there is no active transaction, then "PRAGMA
journal_mode=WAL" gives an error. I know this seems inconsistent, but it is
technically correct, so we are not going to stop our 3.8.6 testing and
unwind a weeks worth of work to "fix" it now. Maybe for 3.8.7. Depending
on how complex the fix is.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users