1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Fix an assert() in pager.c that could fail in a concurrent transaction.

FossilOrigin-Name: 69394ddaa2bc9d26477b4359c676c598b733ac9f
This commit is contained in:
dan
2015-08-26 18:54:45 +00:00
parent de36c76a23
commit f6cf5ea790
5 changed files with 32 additions and 11 deletions

View File

@@ -505,5 +505,26 @@ do_multiclient_test tn {
} {1234 5678 ok}
}
do_multiclient_test tn {
do_test 5.$tn.1 {
sql1 {
PRAGMA journal_mode = wal;
CREATE TABLE tt(a INTEGER PRIMARY KEY, b);
CREATE TABLE t2(a INTEGER PRIMARY KEY, b);
INSERT INTO tt VALUES(1, randomblob(400));
BEGIN CONCURRENT;
}
} {wal}
do_test 5.$tn.2 {
sql1 { UPDATE t2 SET b=5 WHERE a=3 }
sql2 { INSERT INTO tt VALUES(2, randomblob(6000)) }
} {}
do_test 5.$tn.3 {
sql1 { COMMIT }
} {}
}
finish_test