CREATE TEMPORARY TABLE test (id INTEGER);
BEGIN;
INSERT INTO test (id) VALUES (1);
SAVEPOINT svpt;
INSERT INTO test (id) VALUES (2);
SAVEPOINT svpt;
INSERT INTO test (id) VALUES (3);
SAVEPOINT svpt;
INSERT INTO test (id) VALUES (4);
SAVEPOINT svpt;
INSERT INTO test (id) VALUES (5);
SELECT * FROM test;
SELECT 'Should show values 1..5';
ROLLBACK TO SAVEPOINT svpt;
SELECT * FROM test;
SELECT 'Should show values 1..4';
ROLLBACK TO SAVEPOINT svpt;
SELECT * FROM test;
SELECT 'Per docs, should show values 1..3, but it doesn''t';
COMMIT;
SELECT * FROM test;
SELECT 'Per docs, should show values 1..3, but it doesn''t';
