I think the problem is not in the locking mode but rather:

 PRAGMA journal_mode = off;

I'm not sure if rollbacks actually function with the journalling turned off.
Can you try it without the above line? 
The logic implies that the rows in question should not exist since they are 
rolledback.

hth

--- On Fri, 4/17/09, Ralf Junker <ralfjun...@gmx.de> wrote:

> From: Ralf Junker <ralfjun...@gmx.de>
> Subject: [sqlite] Strange SAVEPOINT behaviour with locking_mode=exclusive
> To: sqlite-users@sqlite.org
> Date: Friday, April 17, 2009, 3:07 PM
> I experience some strange behaviour
> with SAVEPOINT in combination with locking_mode=exclusive.
> Below is a script which I assembled from savepoint.text 13.1
> to 13.4. Those tests run OK in normal locking mode, but fail
> in exclusive locking more.
> 
> To reproduce, run the script below on a NEW and EMPTY
> database. The result difference is marked as follows:
> 
>   a  b
>   1  2 
>   3  4 
>   5  6 
>   7  8 
>   9  10 
>   11 12 
>   13 14 <- missing rows if run in exclusive mode 
>   15 16 <- on a new and empty database
> 
> <SQL>
> 
> PRAGMA locking_mode=exclusive;
> 
> DROP TABLE IF EXISTS t1;
> 
> BEGIN;
>   CREATE TABLE t1(a PRIMARY KEY, b);
>   INSERT INTO t1 VALUES(1, 2);
> COMMIT;
> 
> PRAGMA journal_mode = off;
> 
> BEGIN;
>   INSERT INTO t1 VALUES(3, 4);
>   INSERT INTO t1 SELECT a+4,b+4  FROM t1;
> COMMIT;
> 
> BEGIN;
>   INSERT INTO t1 VALUES(9, 10);
>   SAVEPOINT s1;
>     INSERT INTO t1 VALUES(11, 12);
> COMMIT;
> 
> BEGIN;
>   INSERT INTO t1 VALUES(13, 14);
>   SAVEPOINT s1;
>     INSERT INTO t1 VALUES(15, 16);
>     ROLLBACK TO s1;
> ROLLBACK;
> 
> SELECT * FROM t1;
> 
> </SQL>
> 
> I wonder if this behaviour is intended of if there is an
> error in the library?
> 
> Ralf
> 
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> 
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to