http://www.sqlite.org/pragma.html#pragma_journal_mode states

The OFF journaling mode disables the atomic commit and rollback capabilities
of SQLite. The ROLLBACK command no longer works; it behaves in an undefined
way. Applications must avoid using the ROLLBACK command when the journal
mode is OFF


I don't think this is a bug, just different undefined results.

Regards,

Noah


SQLite 3.7.2 has a regression with journal_mode=off and
locking_mode=exclusive. Here is the SQL reproduce:

------------
drop table if exists t1;

PRAGMA locking_mode=exclusive;
pragma locking_mode;

CREATE TABLE t1(a PRIMARY KEY, b);

PRAGMA journal_mode = off;

BEGIN;
  INSERT INTO t1 VALUES(13, 14);
  SAVEPOINT s1;
    INSERT INTO t1 VALUES(15, 16);
  ROLLBACK TO s1;
ROLLBACK;

SELECT * FROM t1;
-------------

SQLite3 3.7.2 rolls back the savepoint insert and yields:

exclusive
exclusive
off
13|14

SQLite3 3.6.23.1 commits the savepoint insert and yields:

exclusive
exclusive
off
13|14
15|16

The SQL was shortened from savepoint.test. It works well in
locking_mode=normal so I dare say this is most likely a
locking_mode=exclusive bug.

Ralf

-- 
View this message in context: 
http://old.nabble.com/rollback-to-savepoint-regression---bug-with-journal_mode%3Doff-and-locking_mode%3Dexclusive-tp29554275p29554673.html
Sent from the SQLite mailing list archive at Nabble.com.

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

Reply via email to