From: dan Date: Fri, 26 May 2017 16:51:15 +0000 (+0000) Subject: Add extra test cases for deferred page allocation. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7037787d303d6c26b74e6f62e317dc86d7381618;p=thirdparty%2Fsqlite.git Add extra test cases for deferred page allocation. FossilOrigin-Name: 9df0195780306a26709e87daabf9d426856aebf2082060b98818f2d48c7472ec --- diff --git a/manifest b/manifest index bb07f60ea8..cb5622a88f 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sa\sproblem\swith\sdeferred\spage\sallocation\sin\stransactions\sthat\srevert\spage\nallocations\sby\ssavepoint\srollbacks. -D 2017-05-26T16:15:05.191 +C Add\sextra\stest\scases\sfor\sdeferred\spage\sallocation. +D 2017-05-26T16:51:15.019 F Makefile.in 1cc758ce3374a32425e4d130c2fe7b026b20de5b8843243de75f087c0a2661fb F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 8eeb80162074004e906b53d7340a12a14c471a83743aab975947e95ce061efcc @@ -612,7 +612,7 @@ F test/concfault.test 500f17c3fcfe7705114422bcc6ddd3c740001a43 F test/concurrent.test 3eb5e6a911dc6ff72e3a679f563e683b436f6c701e6e1d6050173df2b8448d6b F test/concurrent2.test 9dfbeb0a323733fe1d13443371734bb94a674dbf777f464365475903873111f8 F test/concurrent3.test 0a5f7e3036d1eccf0782d7153ac21f5f222e9468 -F test/concurrent4.test d1b808b0c65f8a6368da1ca30bab9e25b0851f9dc529ffab761ba8c9a42d2943 +F test/concurrent4.test 989c6575225f9c4ef5d2392a9b9d0405665567c7501a3e44129598794d9b1b5f F test/conflict.test 029faa2d81a0d1cafb5f88614beb663d972c01db F test/conflict2.test bb0b94cf7196c64a3cbd815c66d3ee98c2fecd9c F test/conflict3.test a83db76a6c3503b2fa057c7bfb08c318d8a422202d8bc5b86226e078e5b49ff9 @@ -1590,7 +1590,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 47a7dd92355ffd74645cf8da8186d5799c05a95907877a09c28de41135deeede -R 09d4e4c80f127f9ecf740a4309c9fec3 +P a4a3bbe64690856403642352f36e664a5a7fba686463a63446c6ada99df4e89f +R 69e13a62db6a845ec0ea0e91eabb688e U dan -Z bd7d66ea928950ff2ef1b7b7ec07e968 +Z 97d78c704135d26c80fab0abc59ae894 diff --git a/manifest.uuid b/manifest.uuid index cea7e0cc0d..c0fc82007e 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -a4a3bbe64690856403642352f36e664a5a7fba686463a63446c6ada99df4e89f \ No newline at end of file +9df0195780306a26709e87daabf9d426856aebf2082060b98818f2d48c7472ec \ No newline at end of file diff --git a/test/concurrent4.test b/test/concurrent4.test index d129eaf7ac..ce55cdd848 100644 --- a/test/concurrent4.test +++ b/test/concurrent4.test @@ -42,6 +42,47 @@ do_execsql_test 1.2 { ROLLBACK TO abc } do_execsql_test 1.3 { COMMIT } do_execsql_test 1.4 { PRAGMA integrity_check } {ok} +do_multiclient_test tn { + do_test 2.$tn.1 { + sql1 { + PRAGMA journal_mode = wal; + CREATE TABLE t1(a, b); + WITH s(i) AS (SELECT 1 UNION ALL SELECT i+1 FROM s WHERE i<100) + INSERT INTO t1 SELECT randomblob(400), randomblob(400) FROM s; + + CREATE TABLE t2(a, b); + WITH s(i) AS (SELECT 1 UNION ALL SELECT i+1 FROM s WHERE i<100) + INSERT INTO t2 SELECT randomblob(400), randomblob(400) FROM s; + } + + sql1 { + BEGIN CONCURRENT; + INSERT INTO t1 VALUES(randomblob(3000), randomblob(3000)); + } + } {} + + do_test 2.$tn.2 { + sql2 { + WITH s(i) AS (SELECT 1 UNION ALL SELECT i+1 FROM s WHERE i<10) + INSERT INTO t2 SELECT randomblob(400), randomblob(400) FROM s; + } + sql2 { + DELETE FROM t2 WHERE rowid<10; + } + } {} + + do_test 2.$tn.3 { + sql1 { + COMMIT; + PRAGMA integrity_check; + } + } {ok} + do_test 2.$tn.4 { + sql2 { + PRAGMA integrity_check; + } + } {ok} +} finish_test