Commit Graph

64 Commits

Author SHA1 Message Date
dan
cddfc3922c Fix a couple of test scripts to match the new wal recovery behaviour on this branch.
FossilOrigin-Name: 3af61e83532f76f0f3252a28663415d37b096ddf05a9c58fa79303933c09abce
2020-07-27 15:05:20 +00:00
drh
158931ab64 Test case changes so that they work with both Tcl8.6 and Tcl8.7.
FossilOrigin-Name: 7b771405a9adc3ec191156be4ebe7122f4c698d88d69ae2134c75acb8d8feebb
2019-04-12 16:25:42 +00:00
dan
69aedc8db4 Fix various problems in test scripts preventing "make test" from passing on
F2FS file-systems with the "atomic-write" feature.

FossilOrigin-Name: 56d93d070d6b92d8a5a3fec1b09aae8911116c73d072fc5022f0b51668ed996b
2018-01-13 13:07:49 +00:00
dan
f12ba66cf8 On unix, if the *-shm file cannot be opened for read/write access, open it
read-only and proceed as if the readonly_shm=1 URI option were specified.

FossilOrigin-Name: ba718754fa5ab8596cb84b751051de98afa2706fe6c5df39ad6d925d790719ee
2017-11-07 15:43:52 +00:00
dan
44c8a97e01 Fix test cases in wal2.test broken by the locking change in the previous
commit.

FossilOrigin-Name: f569c3517234881f9425075aab65a32ffd0deb8e793f421a241d8cca881da33f
2017-11-02 18:57:46 +00:00
drh
daaae7b9d1 Update the mechanism used to keep track of what kind of syncing to do for
WAL transaction commits and checkpoint operations.  Use the checkpoint-style
of syncing to sync the header of a new or restarted WAL file.

FossilOrigin-Name: bf65dae8d4297c57ac63228ccf0100f9fabf2fb600438c9f2e10a29c4b118168
2017-08-25 01:14:43 +00:00
drh
108e5a9a6c Fix some test cases so that they work under the Apple configuration.
FossilOrigin-Name: 399c60764d3fdec49dab1745c30930ca1dbafe70
2016-03-17 23:56:23 +00:00
drh
e243de5cf5 If SQLITE_DEFAULT_WAL_SYNCHRONOUS is not the same value as
SQLITE_DEFAULT_SYNCHRONOUS and the application has not run
"PRAGMA synchronous", then set synchronous to the 
SQLITE_DEFAULT_WAL_SYNCHRONOUS setting when entering WAL mode for
the first time.

FossilOrigin-Name: 5791407b523abd24e832fc2361b3e9f01ee2f36a
2016-03-08 15:14:26 +00:00
dan
e03d76254c Update a test case in wal2.test that explicitly corrupts a checksum in the wal file to account for the fact that the first byte of said checksum may initially be 0xFF.
FossilOrigin-Name: 2b935bdea1452505f36dc8c7aad49e6c42f4eceb
2014-05-01 10:19:16 +00:00
drh
f6b1a8e1a5 Make sure errors encountered while initializing extensions such as FTS4
get reported out from sqlite3_open().  This fixes a bug introduced by
check-in [9d347f547e7ba9].  Also remove lots of forgotten "breakpoint"
commands left in test scripts over the years.

FossilOrigin-Name: ca3fdfd41961d8d3d1e39d20dc628e8a95dabb2f
2013-12-19 16:26:05 +00:00
mistachkin
d5578433ff Fix all known instances of 'repeated the' style typos in comments. No changes to code.
FossilOrigin-Name: 9b19b847533f944f289d93dcdba29c0d67bf251c
2012-08-25 10:01:29 +00:00
dan
5373b76bdc Ensure that there is always at least one aReadMark slot usable by an unprivileged reader while a checkpoint is running. Also, if one or more transactions are recovered from a log file, initialize one of the aReadMark slots to contain mxFrame as part of the recovery process.
FossilOrigin-Name: e4163596339c2166f9c4356ab824fff8bda8d0b0
2012-07-17 14:37:12 +00:00
drh
957ed0b3fe Fix the wal2.test script so that it works on big-endian machines.
FossilOrigin-Name: c4ab72f75090a420f73b85334b4c42a85af951a5
2012-05-11 23:01:33 +00:00
drh
8c815d14f8 On unix, ignore the umask when creating journal files. That way, journal files
will have exactly the same permissions as the original database and any
process that has permission to write to the database can also recover
hot journals.

FossilOrigin-Name: 84b324606adc8437338c086404eb157f30f04130
2012-02-13 20:16:37 +00:00
dan
0774bb59c6 Modify test cases to account for the ZERO_DAMAGE change.
FossilOrigin-Name: 68684495f1a62a41ad27934f3a6d3bc9d290a57d
2011-12-19 10:07:56 +00:00
drh
4eb02a4556 Enhance the WAL header sync so that it honors the various synchronous
pragmas, settings, and device characteristics.

FossilOrigin-Name: 9799241f7de952c4d1ea8bf6508b577d2b57a370
2011-12-16 21:26:26 +00:00
dan
15bf39034a Merge latest trunk changes into experimental branch.
FossilOrigin-Name: 7e515055f219b01dd72df4e27bdcabfa2f9be5c2
2011-08-12 16:30:30 +00:00
dan
262765a74e Add tests to improve coverage of vdbesort.c.
FossilOrigin-Name: 87a15917d7d88285054e2a319506dd4a0cac9722
2011-08-12 11:59:57 +00:00
mistachkin
fda06befd5 Add retry logic for AV defense to winOpen. Also, refactor test suite to allow the key Tcl file operations (e.g. copy and delete) to be retried.
FossilOrigin-Name: 9007586fdabed8dbcc78581ea9821cfd1f9a4c8c
2011-08-02 00:57:34 +00:00
shaneh
9dd6e0801d Updates to test code in os_win to bring winSync inline with unixSync (test code only).
Updated a few test scripts to account for dirsync counting issues on Windows.

FossilOrigin-Name: 8f99c5bf639ee4f6384cc3c2d7f056d1b08e4f16
2011-04-15 20:18:40 +00:00
dan
7fa65fbfa8 Changes to wal tests so that they work with DEFAULT_AUTOVACUUM defined.
FossilOrigin-Name: b477852f82c1fddbda61fad83d55055ad8503dda
2011-04-01 19:14:40 +00:00
dan
d42892ebaf Fix minor problems with the output of "PRAGMA wal_checkpoint". In both code and tests.
FossilOrigin-Name: aef61036b31963e4c3ff4e8acf8c1734dc9394af
2011-02-02 19:17:39 +00:00
drh
87fa53ee8d Merge in the blocking-checkpoint enhancement, including the new
sqlite3_wal_checkpoint_v2() interface and the
PRAGMA wal_checkpoint(full) statement.

FossilOrigin-Name: bac7342c368a7c4f5f2878e08d9581dcbf57dd58
2011-02-02 16:34:08 +00:00
dan
18826195f2 Extra tests for "PRAGMA checkpoint_fullfsync".
FossilOrigin-Name: e38c81cc18d2ceaa1644aaba64530ba5d1fbf2cf
2010-11-20 12:01:35 +00:00
dan
11f273fc0e Add tests for "PRAGMA checkpoint_fullfsync".
FossilOrigin-Name: 765aa1b862fa38cede89bafe0e10c094e0544b7e
2010-11-19 18:48:10 +00:00
dan
bdd9af0fc8 Update test cases to account for the change in the previous commit.
FossilOrigin-Name: ae089ec881beb1c2d278303ba964aaeffad1afe4
2010-11-18 16:14:24 +00:00
dan
8c40800439 If a database file with the WAL flag set is opened in exclusive-locking mode, use heap memory to store the wal-index instead of shared-memory.
FossilOrigin-Name: 8dd5c69198619866923c6053b71899c1fb8c4c67
2010-11-01 17:38:24 +00:00
dan
d5e0101be0 Merge trunk changes into experimental branch.
FossilOrigin-Name: 15368a9f8523d5fb611cd576080daed2cf2f1500
2010-08-03 18:29:04 +00:00
dan
d08640871c Experimental refactoring of the Pager object state.
FossilOrigin-Name: 03a240514aa07a22db787d221641253f23933e88
2010-08-02 14:32:52 +00:00
drh
9e5f10743d Modify wal2.test to disable tests requiring TCL 8.5 if the test harness is
compiled using TCL 8.4.

FossilOrigin-Name: 016486c7d544dcf9b7422cb0fb9804aa1c418f68
2010-08-02 10:59:13 +00:00
dan
1e5de5a13d Changes to wal.c so that SQLite can read even if the WAL file is opened read-only, provided the wal-index (shm file) is opened read/write.
FossilOrigin-Name: 932d19da73c9673cdd4cc01289b17761c23d23cb
2010-07-15 18:20:53 +00:00
dan
e84322e503 Fix an assert() failure in wal2.test caused by messing with the contents of shared memory.
FossilOrigin-Name: 9f452514d96ab8d424eadc55c283c53fe831476d
2010-07-14 18:10:02 +00:00
dan
50833e32c1 Test the libaries response to read-only or unreadable database, WAL and wal-index files. If a WAL file cannot be opened in read/write mode, return SQLITE_CANTOPEN to the caller.
FossilOrigin-Name: 45bb84c6283d803fc29077fdc2d06fa50ec06a59
2010-07-14 16:37:17 +00:00
dan
ddb0ac4b9f On unix, try to create the *-wal and *-shm files with the same permissions as the associated database file.
FossilOrigin-Name: e5d180eed245437b61bfb257ee01e2571c93afe7
2010-07-14 14:48:58 +00:00
dan
c385793495 Test that a corrupted WAL hash-table does not put the library into an infinite loop.
FossilOrigin-Name: c73886ed7497c0daf798c3b02ca6f5a1c2addde3
2010-07-14 07:06:47 +00:00
dan
f6c614715c Make sure the schema is loaded before preparing a "PRAGMA journal_mode" command. This helps it return meaningful results when it is the first command executed by a new database connection.
FossilOrigin-Name: ef126e775a02d69a9cab53028513e8799e1b6044
2010-07-07 13:54:28 +00:00
dan
10f5a50e57 Add a version number to the wal-index header. If SQLite encounters a version number in either the wal or wal-index files that it does not understand, the operation is abandoned and SQLITE_CANTOPEN returned.
FossilOrigin-Name: 8d0f8a7f70d6fb42369411a934b30f8c8ca8322f
2010-06-23 15:55:43 +00:00
dan
47ee386f06 Add codec support to wal mode.
FossilOrigin-Name: 393741eba353d5d242b8e3c96db3ea2b92228036
2010-06-22 15:18:44 +00:00
dan
68928b6c3e Some changes to test scripts related to codec enabled versions of sqlite.
FossilOrigin-Name: 85dd51a75c75b2a123744f646e04538e4e5d89b3
2010-06-22 13:46:43 +00:00
dan
13a3cb82ce Experimental change to the xShmXXX parts of the VFS interface.
FossilOrigin-Name: ca68472db01c14a899892007d1cbaff5e86ae193
2010-06-11 19:04:21 +00:00
drh
db7f647e41 Shift the meaning of aReadMark[] back so that +1 offset from mxFrame is
removed.  Add the new READMARK_NOT_USED value (0xffffffff) instead of
zero to signal an aReadMark[] that is not in use.

FossilOrigin-Name: c576827d55c156572b76cf7063e9f253ca6e7403
2010-06-09 14:45:12 +00:00
dan
23f719207f Add a couple of extra coverage tests for wal.c.
FossilOrigin-Name: cfe60254df50f086014b115f1a2d9e31c85d67fd
2010-06-07 06:11:39 +00:00
dan
3cac5dc9bc Clarify an assert in sqlite3WalExclusiveMode().
FossilOrigin-Name: 255850699ddbf4aad8cc3223aefbada35daa0703
2010-06-04 18:37:59 +00:00
dan
23dced35ea Add test for the code that detects an inconsistent pair of wal-index headers to wal2.test.
FossilOrigin-Name: 157feba10f7ac01eecf79715c44bb16c98958280
2010-06-04 12:22:35 +00:00
dan
1f55e28d2a Enhancements to test_vfs.c and walfault.test.
FossilOrigin-Name: ac0de2f39e948f3b00e96eebf56ebee70472020d
2010-06-03 09:25:10 +00:00
shaneh
a1a889ecb4 Updated wal2.test for windows testing.
FossilOrigin-Name: c3606f3985e4ab38479409c13f3a01d1be4f8189
2010-06-02 16:39:53 +00:00
dan
5f3f3b2962 Fixes to the test cases in wal2.test.
FossilOrigin-Name: cd5fbcbce8b55f24c0bf349b179c26e333ff7172
2010-06-01 07:51:47 +00:00
dan
d0aa34277f Avoid dropping the checkpoint lock after a recovery run as a precursor to a checkpoint operation.
FossilOrigin-Name: cc25cfa04630a43c1de26f2dbdacbe46c110a2b5
2010-05-31 16:41:53 +00:00
dan
94b7f76b96 i
i
Minor changes to checksum related test cases.

FossilOrigin-Name: 60c22bde52121993d4bea11eef38ab285c737e2c
2010-05-29 06:18:54 +00:00
drh
c2857bf2a5 Fix the wal2.test script so that it works in auto_vacuum mode.
FossilOrigin-Name: 6a818afb93ca8383abb55e3835e14c74c3e3de23
2010-05-24 17:00:19 +00:00