Commit Graph

89 Commits

Author SHA1 Message Date
dan
94e95ea46e Copy some extra test infrastructure from the mutexfree-shmlock branch to trunk.
FossilOrigin-Name: 883337ffdb434b6856ceaada121c0be67e2fdec7b447675f45e85568ef28d7d9
2018-12-24 15:22:47 +00:00
drh
7da56b4f65 Many more test cases fixed. Only a few remain.
FossilOrigin-Name: 99b9d7eef68fd6d5c9eecb5fbe3dfe002c1ca4a8
2016-03-14 18:34:42 +00:00
dan
be7721d103 Avoid running some particularly time-consuming tests as part of veryquick.test.
FossilOrigin-Name: f465944b75a800ddc6920229ad32c2f39ff91e19
2016-02-04 17:31:03 +00:00
drh
b7c2f86b85 All WAL frame overwrites even if there are active savepoints. This is safe
because a ROLLBACK TO will cause all reverted pages to be rewritten to the
WAL file prior to COMMIT.

FossilOrigin-Name: 99b31a6b491c1c51227f478d3713b020d37a17cf
2016-01-09 23:55:47 +00:00
dan
d6f7c97952 If a single page is written to the wal file more than once, have each subsequent copy overwrite the original frame.
FossilOrigin-Name: 5d113aef2c7d746e8eda88d4e36c04a39b0a11be
2016-01-09 16:39:29 +00:00
drh
7416f2edd9 Disable the page cache bulk allocation for the shrink.test and wal.test
modules.

FossilOrigin-Name: 3418f1f165a0746cdf130e6a19fa0e1eb56df1d4
2015-07-25 03:10:12 +00:00
drh
1fb6a11072 Ensure the "PRAGMA journal_mode=WAL" works coming from any other journal_mode
with ATTACH-ed databases.

FossilOrigin-Name: e54330b43127e46fc6494748cbb353a6fc91cfd7
2014-04-04 14:12:52 +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
drh
f9c8ce3ced Standardize the error messages generated by constraint failures to a format
of "$TYPE constraint failed: $DETAIL".  This involves many changes to the
expected output of test cases.

FossilOrigin-Name: 54b221929744b1bcdbcc2030fef2e510618afd41
2013-11-05 13:33:55 +00:00
dan
11f71d6ae4 Fixes to allow testfixture to be compiled with SQLITE_OMIT_VIRTUAL_TABLE defined.
FossilOrigin-Name: 00231fb0127960d700de3549e34e82f8ec1b5819
2013-05-15 18:34:17 +00:00
mistachkin
56749cd1ba Adjust a WAL test result due to changes in the corresponding return code name.
FossilOrigin-Name: 9272009f7932b3f18006f73776e36b8ef8770d3e
2013-04-29 08:58:00 +00:00
drh
9b4c59fa1b Refactoring the mmap interface. The controlling pragma is now "mmap_size"
instead of "mmap_limit".  Also change SQLITE_CONFIG_MMAP_LIMIT and
SQLITE_FCNTL_MMAP_LIMIT to SQLITE_CONFIG_MMAP_SIZE and
SQLITE_FCNTL_MMAP_SIZE, respecctively.  
The default mmap_size is now always 0, meaning that
memory mapped I/O is off by default.  There is a new compile-time option
SQLITE_MAX_MMAP_SIZE that determines a hard upper bound on the mmap_size.
Setting SQLITE_MAX_MMAP_SIZE to zero disables the memory-mapped I/O logic
and causes it to be omitted from the build.  An extra argument is added
to SQLITE_CONFIG_MMAP_SIZE that can optionally lower the SQLITE_MAX_MMAP_SIZE
at start-time. The SQLITE_MAX_MMAP_SIZE is zero for platforms where we 
know that it does not work, meaning that it cannot be turned on by mistake
on those platforms.

FossilOrigin-Name: ea1404a10abd7f68e1f8e0708c8a3199d1f79665
2013-04-15 17:03:42 +00:00
drh
d040e76442 Add new primary error codes SQLITE_NOTICE and SQLITE_WARNING for use with
sqlite3_log().  Add new extended error codes SQLITE_NOTICE_RECOVER_WAL and
SQLITE_NOTICE_RECOVER_ROLLBACK to use with sqlite3_log() messages that occur
on each recovery.

FossilOrigin-Name: be7d2c5482c41baf000d7fb5dccc31b974e91064
2013-04-10 23:48:37 +00:00
drh
188d488409 Disable the use of memory-mapped I/O if the SQLITE_DISABLE_MMAP macro is
defined.  Automatically define this macro for OpenBSD and QNX.  Other
systems are likely to be added to the disabled list over time.

FossilOrigin-Name: 8a4314a398c6c6efb25e6993c826b7e60d9bb1f9
2013-04-08 20:47:49 +00:00
dan
d7a558a9fb Improve the code coverage of "permutations.test coverage-pager".
FossilOrigin-Name: b095e2cdb61ca8487255687f58fb1024d40f3986
2013-04-05 20:40:43 +00:00
dan
d409792838 Change an assert in pager.c to acknowledge that it is possible for sqlite3PagerRollback() to return SQLITE_CORRUPT.
FossilOrigin-Name: d641d3d20d80fdb86d91de31fcf2eb5ca3c5c715
2013-04-02 18:31:29 +00:00
drh
41f89cc676 Previous check-in accidently left mmap turned off by default. This checkin
fixes that.  Unfortunately, shared.test is now segfaulting.  All other
veryquick tests appear to work, however.

FossilOrigin-Name: a850c7319c20b5757983443df05cf2aa4250053b
2013-03-26 01:07:50 +00:00
dan
7909e54a22 Update wal mode tests so that they work with the mmap test permutation.
FossilOrigin-Name: f7295872a36539d10edaf0c633f935f25cf73657
2013-03-22 20:15:31 +00:00
mistachkin
4ec0100f35 Merge updates from trunk.
FossilOrigin-Name: 224c65e4a5c6ede076c364c93933cedd17f1e70b
2012-05-17 21:04:26 +00:00
drh
ed1d84e395 Fix a bug in the wal.test script so that it works on big-endian systems.
FossilOrigin-Name: 40fe9088fb73eee7b37b574a1dda422266a58638
2012-05-11 20:43:47 +00:00
mistachkin
6aa18c95f1 Merge and manually resolve testing updates from trunk.
FossilOrigin-Name: 5eecdb44dd809e91002b8ecf59ada72f4b56549a
2012-03-08 20:22:42 +00:00
mistachkin
f8a784645c On Windows, make sure the current directory value used by the test suite is 'normalized' to what the parent command shell sees. Also, clean the test directories used by the quota2.test file.
FossilOrigin-Name: 82bcd7ec1531f6d71c079578434c58d3ce46a1de
2012-03-08 20:00:36 +00:00
mistachkin
c548465435 Add compile-time define to indicate if the VFS supports the concept of a current directory (as WinCE and WinRT do not). Avoid using the GetTempPath and GetFullPathName APIs on WinRT. Some tests still need adjustments.
FossilOrigin-Name: 86c049a171acc3f4a43771f3e7176a90210d7799
2012-03-05 22:52:33 +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
1eaaf93a83 Some fixes to the test suite so that it works with ZERO_DAMAGE set to true.
Still lots more problems remain.

FossilOrigin-Name: 41891b231e20a1d32b1d7449e7863470eb38ca0a
2011-12-19 00:31:09 +00:00
drh
d515660523 Remove a couple of incorrect assert statements so that the test suite will
run with -DSQLITE_DEFAULT_CACHE_SIZE=0.

FossilOrigin-Name: 87614b62ace530761e0e1170ec5840b212735ec6
2011-11-12 16:46:55 +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
dan
b73da5bd1c Fix test script attach4.test so that it works with type 1 VFS implementations (no wal). And wal.test so that it work with a small default pager cache size.
FossilOrigin-Name: 29c7b42587000704d61f49badd584ac7040c3d7d
2011-04-07 05:17:32 +00:00
dan
dc5df0f824 Fix a benign inaccuracy in the os_unix.c SQLITE_FCNTL_SIZE_HINT code.
FossilOrigin-Name: 61a6ccbe3c9c3ad5f35fb325e3c327cb19409925
2011-04-06 19:15:45 +00:00
dan
ce8e5ffe1c When committing a WAL transaction, do not write any pages to the WAL file with page numbers greater than the size of the database image in pages.
FossilOrigin-Name: 311d0b613d9cfa2dbcbb9ef2450041b1fd48770a
2011-04-05 16:09:08 +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
f2b8dd588d Fixes for SQLITE_BUSY handling in blocking checkpoint code.
FossilOrigin-Name: 4c663a4dcc77e00558edd94f58410605b95db33a
2010-11-18 19:28:01 +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
5a9e07eb40 Disable the SQLITE_MAX_PAGE_SIZE compile time option (it is now always set to 65536). Fix some other problems in test files.
FossilOrigin-Name: 56cc883d3af5574c9dafecef8aa96d1d05c01b83
2010-08-18 15:25:17 +00:00
shaneh
35cf908a86 Fix issue with wal.test on Windows.
FossilOrigin-Name: 3497f54ac2f85746c50fe6f94380a22033f2464b
2010-08-18 14:54:03 +00:00
dan
eb8763d7b3 Invoke sqlite3_log() whenever one or more frames are recovered from a WAL file.
FossilOrigin-Name: e05089aaefe02ec59a1923812349471a78075d29
2010-08-17 14:52:22 +00:00
dan
4bcc4988f1 Add tests for different page sizes to wal.test. Including 64K pages.
FossilOrigin-Name: d95bcc052910cfd4848afe0d32f717506ad5a789
2010-08-16 19:23:02 +00:00
drh
b2eced5de2 Increase the maximum page size from 32k to 64k.
FossilOrigin-Name: 45362437d491fbe0f033a67b398f8ba68cbf1b3b
2010-08-12 02:41:12 +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
a4a9095ec0 Rationalize a common pattern in tcl test cases into proc do_multiclient_test.
FossilOrigin-Name: efe44564983f115017658dd8a130226366d42bab
2010-06-15 19:07:42 +00:00
dan
c1a60c51dc Refactor some of the global variables and commands used by tester.tcl.
FossilOrigin-Name: c2edf8e17f874d0ca4e94b75575bf6e14eea1f05
2010-06-07 14:28:16 +00:00
dan
6e6bd5658f Fix a problem with rolling back to a savepoint opened before the writer decided to wrap the log file.
FossilOrigin-Name: 6b4aed6aae7dc9e92807d27375cbe1e83c15841b
2010-06-02 18:59:03 +00:00
dan
dcb1169fb7 Update another test case in wal.test.
FossilOrigin-Name: 99fde69e61d12cf95b47db70c4647c30be2d2f45
2010-05-31 14:18:45 +00:00
drh
a2ac9df170 Change WAL test cases to account for the improved concurrency in the new
checkpoint logic.

FossilOrigin-Name: 2d6f2485053e6d2a67abda9a80693ca68f4556d2
2010-05-31 13:11:49 +00:00
drh
34116eaf6a Do not fail a checkpoint just because active readers prevent backfill.
FossilOrigin-Name: 9aa4243e0cedcc9204994d04af1b2b7a80c048bd
2010-05-31 12:30:52 +00:00
dan
71d8991932 Change the checksum used in WAL files so that each frames checksum depends on the content of the WAL header and all frame headers and content up to and including the frame to which the checksum is attached.
FossilOrigin-Name: 8a53f12c83a107684b99f4a9de371b5ea3ca810a
2010-05-24 13:57:42 +00:00
dan
b8fd6c2fe6 Change the WAL file format to support two kinds of checksums - one that is fast to calculate on little-endian architectures and another that is fast on big-endian architectures. A flag in the wal-header indicates which the file uses.
FossilOrigin-Name: 65ba804dd1d31d1eef6ae3f40a3ade344a410b84
2010-05-24 10:39:36 +00:00
drh
7e263728f2 Make use of the extra information in the WAL header and frame header to
enhance robustness.

FossilOrigin-Name: 9580ecb7e3beb1949a71784a3dcd1823a88e4a9d
2010-05-20 21:21:09 +00:00