Do not attempt to run hot journal rollback tests in lock5.test with the "inmemory_journal" permutation, which cannot generate hot journals.

FossilOrigin-Name: 1e6fa95b88cace9e6cac476863d57cfd8de483f83c922ff964b77cbaee6e9ae4
This commit is contained in:
dan 2024-06-12 11:41:18 +00:00
parent 41caf1cdfa
commit f8ed7db472
3 changed files with 72 additions and 70 deletions

View File

@ -1,5 +1,5 @@
C Handle\sthe\scase\swhere\sunix-dotfile\sis\sused\swith\sURI\sparameter\snolock=1.
D 2024-06-11T20:28:56.529
C Do\snot\sattempt\sto\srun\shot\sjournal\srollback\stests\sin\slock5.test\swith\sthe\s"inmemory_journal"\spermutation,\swhich\scannot\sgenerate\shot\sjournals.
D 2024-06-12T11:41:18.217
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -1388,7 +1388,7 @@ F test/lock.test be4fe08118fb988fed741f429b7dd5d65e1c90db
F test/lock2.test 5242d8ac4e2d59c403aebff606af449b455aceff
F test/lock3.test f271375930711ae044080f4fe6d6eda930870d00
F test/lock4.test 27143363eda1622f03c133efc8db808fc331afd973486cb571ea71cd717d37b8
F test/lock5.test e6d5a7dd3c3c2ad83b05dbd50d0bd8b2a98a13ce6b2f3297e0edfbebb3413de3
F test/lock5.test 02e00537ed5bea94d74e914a579cd94b9b52b342361d9ea270a8630e62bb131d
F test/lock6.test ad5b387a3a8096afd3c68a55b9535056431b0cf5
F test/lock7.test 49f1eaff1cdc491cc5dee3669f3c671d9f172431
F test/lock_common.tcl 2f3f7f2e9637f93ccf609df48ef5b27a50278b6b1cd752b445d52262e5841413
@ -2195,8 +2195,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P 4ae3300b79e03381fd7f1033bb7978bb6367369790f17c3bdacac51e205edaf9
R f4ac66d6cce3f1556fd45b9db23cb700
P 3925a5b904e159d54455cfc73fe837a9c6ea3a6d60da63afde3242b4d6f67c90
R 78b8c4cb68d9ed22c3978516f0902770
U dan
Z 59b7d2f0f8fc06cadab577170f885282
Z 84fe133e30abe6e15019a66820115796
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
3925a5b904e159d54455cfc73fe837a9c6ea3a6d60da63afde3242b4d6f67c90
1e6fa95b88cace9e6cac476863d57cfd8de483f83c922ff964b77cbaee6e9ae4

View File

@ -198,72 +198,74 @@ ifcapable lock_proxy_pragmas {
#####################################################################
reset_db
# 1. Create a large database using the unix-dotfile VFS
# 2. Write a large transaction to the db, so that the cache spills, but do
# not commit it.
# 3. Make a copy of the database files on disk.
# 4. Try to read from the copy using unix-dotfile VFS. This fails because
# the dotfile still exists, so SQLite things the database is locked.
# 5. Remove the dotfile.
# 6. Try to read the db again. This time, the old transaction is rolled
# back and the read permitted.
#
do_test 2.dotfile.1 {
sqlite3 db test.db -vfs unix-dotfile
execsql {
PRAGMA cache_size = 10;
CREATE TABLE t1(x, y, z);
CREATE INDEX t1x ON t1(x);
WITH s(i) AS (
SELECT 1 UNION ALL SELECT i+1 FROM s WHERE i<1000
)
INSERT INTO t1 SELECT hex(randomblob(20)), hex(randomblob(500)), i FROM s;
if {[permutation]!="inmemory_journal"} {
# 1. Create a large database using the unix-dotfile VFS
# 2. Write a large transaction to the db, so that the cache spills, but do
# not commit it.
# 3. Make a copy of the database files on disk.
# 4. Try to read from the copy using unix-dotfile VFS. This fails because
# the dotfile still exists, so SQLite things the database is locked.
# 5. Remove the dotfile.
# 6. Try to read the db again. This time, the old transaction is rolled
# back and the read permitted.
#
do_test 2.dotfile.1 {
sqlite3 db test.db -vfs unix-dotfile
execsql {
PRAGMA cache_size = 10;
CREATE TABLE t1(x, y, z);
CREATE INDEX t1x ON t1(x);
WITH s(i) AS (
SELECT 1 UNION ALL SELECT i+1 FROM s WHERE i<1000
)
INSERT INTO t1 SELECT hex(randomblob(20)), hex(randomblob(500)), i FROM s;
}
} {}
do_execsql_test 2.dotfile.2 {
BEGIN;
UPDATE t1 SET z=z+1, x=hex(randomblob(20));
}
} {}
do_execsql_test 2.dotfile.2 {
BEGIN;
UPDATE t1 SET z=z+1, x=hex(randomblob(20));
do_test 2.dotfile.3 {
list \
[file exists test.db] \
[file exists test.db-journal] \
[file exists test.db.lock]
} {1 1 1}
do_test 2.dotfile.4 {
forcecopy test.db test.db2
forcecopy test.db-journal test.db2-journal
file mkdir test.db2.lock
sqlite3 db2 test.db2 -vfs unix-dotfile
catchsql {
SELECT count(*) FROM t1;
} db2
} {1 {database is locked}}
do_test 2.dotfile.5 {
file delete test.db2.lock
execsql {
PRAGMA integrity_check
} db2
} {ok}
db2 close
do_test 2.dotfile.6 {
forcecopy test.db test.db2
forcecopy test.db-journal test.db2-journal
sqlite3 db2 file:test.db2?nolock=1 -vfs unix-dotfile -uri 1
catchsql {
SELECT count(*) FROM t1;
} db2
} {0 1000}
}
do_test 2.dotfile.3 {
list \
[file exists test.db] \
[file exists test.db-journal] \
[file exists test.db.lock]
} {1 1 1}
do_test 2.dotfile.4 {
forcecopy test.db test.db2
forcecopy test.db-journal test.db2-journal
file mkdir test.db2.lock
sqlite3 db2 test.db2 -vfs unix-dotfile
catchsql {
SELECT count(*) FROM t1;
} db2
} {1 {database is locked}}
do_test 2.dotfile.5 {
file delete test.db2.lock
execsql {
PRAGMA integrity_check
} db2
} {ok}
db2 close
do_test 2.dotfile.6 {
forcecopy test.db test.db2
forcecopy test.db-journal test.db2-journal
sqlite3 db2 file:test.db2?nolock=1 -vfs unix-dotfile -uri 1
catchsql {
SELECT count(*) FROM t1;
} db2
} {0 1000}
finish_test