Commit Graph

4155 Commits

Author SHA1 Message Date
dan
abd6d84a11 Add tests to "permutations.test coverage-pager" to cover uncovered branches.
FossilOrigin-Name: 07a0e4e9820a85bf1690214fef3577866c763f92
2013-04-06 11:03:09 +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
ced9813b12 Add further multi-client tests to mmap1.test.
FossilOrigin-Name: a107f75d93b8acd3403d8473a75137378041a833
2013-04-04 19:32:53 +00:00
drh
75f2d540ac Disable memory-mapped I/O for the win32lock.test module
FossilOrigin-Name: 2b3d9805a28e51f646113e22c2dff2272342306e
2013-04-04 17:28:11 +00:00
drh
a478b3fa80 Try to use mmap() to speed access to the database file on windows, linux,
and mac.

FossilOrigin-Name: fff2be60779571c8fb89158db976ec3755e9a223
2013-04-04 00:40:17 +00:00
drh
34f7490311 Change the mmap_limit pragma to report the new limit, or to report the
existing limit if called with no arguments.  Report the default mmap_limit
as part of PRAGMA compile_options.  Set the default mmmap_limit to 0 for
all systems other than linux, mac, windows, and solaris.

FossilOrigin-Name: 2d9f1327fe79e40435ce1e2594d7cd9a5aea0ef2
2013-04-03 13:09:18 +00:00
dan
f7679ad19e When moving a page to make way for the root page of a new table or index in an auto-vacuum database, save the positions of any cursors that may be holding xFetch references to the page being moved.
FossilOrigin-Name: 9d9b1da54a555e8fb6037d63d1952458c12956d2
2013-04-03 11:38:36 +00:00
dan
227a1c482c In btree.c, save the positions of other cursors open on the same table when writing via an incremental blob handle. Otherwise, they may be left holding an out-of-date xFetch page reference.
FossilOrigin-Name: 3f09fba18f7e61e21381ffea13c31b968efd7d77
2013-04-03 11:17:39 +00:00
drh
c3d53189fc Adjustments to mmap1.test so that it works better on windows. It still gets
some answers wrong, but it no longer crashes.

FossilOrigin-Name: ee8d3ceeec40d84adb8798f084b6f1215ab56d92
2013-04-02 20:29:33 +00:00
dan
81d1765ad8 Fix a bug in mmap2.test that was leaving an invalid sqlite3_log() callback installed, causing a crash.
FossilOrigin-Name: c0cdaa07355f51bd217881b5b91ec2a609fa56f4
2013-04-02 20:19:22 +00:00
dan
db082408c6 Add test cases to mmap1.test and pagerfault.test.
FossilOrigin-Name: 3050136be962427cc4dcced6077ef29b2a941405
2013-04-02 18:33:55 +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
dan
f6653871b2 Add new test file btreefault.test.
FossilOrigin-Name: 7fe908afeba16f64edc16824c67b396138581a8f
2013-04-02 15:37:30 +00:00
dan
4ff7bc45c6 Add test cases for errors in mmap() or mremap() is os_unix.c.
FossilOrigin-Name: 3098a3c1e7305033904a496ef534cb312a876fab
2013-04-02 12:04:09 +00:00
drh
8a1b87cb97 A fix an test-case for the ORDER BY problem identified by ticket [a179fe7465].
This change causes sorting to occur in some cases where it is not strictly
necessary.  Further work is needed to avoid those extra sorts.

FossilOrigin-Name: 488089e615e375c01b31544f06e801af950ae3db
2013-03-27 15:04:28 +00:00
drh
138eeeb1b0 Candidate fix for ticket [6bfb98dfc0c]: Make sure invalid cursors drop all
references to database pages prior to doing any insert or update.

FossilOrigin-Name: 322a5f086d9ee46017f750df81527799a54ae258
2013-03-27 03:15:23 +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
drh
0d0614bdc6 Memory-mapped I/O is now on by default. The "PRAGMA mmap_limit(N)" can be
used to issue a hint to the VFS to limit mmap space to N bytes.  The VFS
is free to ignore that hint if desired.  However, if "PRAGMA mmap_limit(0)"
is used, xFetch is never called.

FossilOrigin-Name: 1b37c4effdd03aa2ea938a71b4f22ed27391689b
2013-03-25 23:09:28 +00:00
drh
d1ab8065c1 Add munmap and mremap to the set of os interfaces that can be overloaded
in os_unix.c.

FossilOrigin-Name: 8776047bd776bbf266eb9c3b56683badb84ae73e
2013-03-25 20:50:25 +00:00
drh
dee6554811 Merge all recent trunk changes into the experimental-mmap branch.
FossilOrigin-Name: a607d63f0b6a3d3785e9385187d3e6b92e14fc70
2013-03-25 19:57:26 +00:00
dan
893c0ffc29 Add a test that simulates an error in mmap().
FossilOrigin-Name: 6ec7367d8e98425f00eeb8215ca8964313c1d0b7
2013-03-25 19:05:07 +00:00
dan
a64d5a15b7 Simulate OOM errors in the sqlite3OsFetch() function. Run malloc.test as part of the "mmap" permutation.
FossilOrigin-Name: 77443ef2cd0b29b7822eea544ab8c6c4a93cb67b
2013-03-25 18:25:49 +00:00
dan
e115ff8171 Add a second test for [38b1ae018f].
FossilOrigin-Name: 5062db672c00c3365d51cd6b39815078f5b6b525
2013-03-25 12:02:45 +00:00
dan
1cb90c668c In fts3, when filtering lists for hits in a specific column, edit the list in place in the same way as it is for NEAR filtering. Fix for [38b1ae018f].
FossilOrigin-Name: f85f9103cffa5c8ba6a63a68beb90817147ba080
2013-03-25 11:38:44 +00:00
dan
9d56c6df9a Fix a case where a checkpoint operation could write to an invalid part of a memory mapped region.
FossilOrigin-Name: 8dbe89d05ce91428c69003f0da79d883fa23e2b5
2013-03-23 14:20:42 +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
dan
aa1d67b1d9 Fix a case where the mapped part of a database file may be written during a backup operation.
FossilOrigin-Name: c8d67aefff7299dd5c8abeb2a3a52109c0a823ee
2013-03-22 19:17:45 +00:00
mistachkin
48864df97d Many spelling fixes in comments. No changes to code.
FossilOrigin-Name: 6f6e2d50941e444ebc83604daddcc034137a05b7
2013-03-21 21:20:32 +00:00
drh
0e5fba790a Fix text-to-numeric type casting so that it works correctly on UTF16
strings that contain characters where the LSB is numeric but the MSB
is non-zero.  Ticket [689137afb6da41]

FossilOrigin-Name: 5b22053f918d16f593227a432a5d5b4c195bb0b5
2013-03-20 12:04:29 +00:00
dan
eecc398374 Add test file mmap1.test.
FossilOrigin-Name: aee1f53a74e636776cbbc11bdd5516432ad50533
2013-03-20 10:07:43 +00:00
dan
5d8a137218 Add the sqlite3_io_methods.xMremap() method to the VFS interface. Also "PRAGMA mmap_size".
FossilOrigin-Name: 6183f1bd86ceed76d22d9762f3d7eb33262c62d1
2013-03-19 19:28:06 +00:00
dan
b2d3de3bf4 Use mmap() to read from the database file in rollback mode. This branch is unix only for now.
FossilOrigin-Name: 6f21d9cbf5d457e63a7282015a89ae785526cf6d
2013-03-14 18:34:37 +00:00
dan
27e6df4e41 Enhance tests for ticket [4dd95f6943].
FossilOrigin-Name: 0b452734faa0839c817f040322e7733e423bfce2
2013-03-13 07:02:04 +00:00
drh
725e1ae52e Add a single new test case to the ORDER BY with IN logic verify that if the
RHS of the IN is a descending index that it still works.  Add testcase()
macros to the ORDER BY with IN logic to help verify that corner cases are
tested.

FossilOrigin-Name: 7e7356f1552cd53ea363d1ded3b2c221c9d0be01
2013-03-12 23:58:42 +00:00
drh
3c60421864 Fix a test case that had an ambiguous result.
FossilOrigin-Name: 38c6bddf8cf15fb358858da6da457046f40b61ce
2013-03-12 22:13:33 +00:00
dan
d7e8689078 Add test cases for [4dd95f6943].
FossilOrigin-Name: 723c144c76fc171e5d19072d6d42a08013921ec6
2013-03-12 18:44:49 +00:00
dan
3da0df9d18 Add a test case for the problem fixed by the previous commit.
FossilOrigin-Name: e899b058a703158012c054974bd9a909d75144d8
2013-03-09 14:49:07 +00:00
dan
6d235cb8d8 Fix a problem with resolving "db.view.column" references that appear in UPDATE or DELETE statements executed against views.
FossilOrigin-Name: ddee56c9b2b591b9386b1072c3b3a699f7c1f853
2013-03-09 14:40:24 +00:00
drh
fe7a5d11b6 Fix the char() function so that it works even if SQLITE_OMIT_UTF16 is defined.
FossilOrigin-Name: af542c82e8e7f0415530b639fa397429c5f377f6
2013-03-07 14:00:04 +00:00
mistachkin
5acefe7dbe Skip tests that require UTF-16 support when compiled with SQLITE_OMIT_UTF16.
FossilOrigin-Name: e39391422e748407d74853d3de297dc1ea6b991d
2013-03-07 09:39:18 +00:00
dan
42c4bd02f4 Fix a problem in incrvacuum_ioerr.test. Do not run ioerr6.test with an in-memory journal.
FossilOrigin-Name: 66576b450a0f0329571e344280994a964c967f8f
2013-03-06 11:44:57 +00:00
drh
459f63e7ed Fix a bug (ticket [fc7bd6358f59]) that caused incorrect query results in
three way queries that involved comparing INTEGER and TEXT columns for
equality.

FossilOrigin-Name: 7097241c1220ada318f8eda938c3e3430b94a606
2013-03-06 01:55:27 +00:00
dan
b83c21e600 Do not attempt to set the permissions on an existing journal or wal file. Do this only immediately after creating a new file (or opening one zero bytes in size).
FossilOrigin-Name: 1d8086902ee96347491bce5ec04dc92ccd42efa1
2013-03-05 15:27:34 +00:00
dan
e3664fb03c Add extended error code SQLITE_READONLY_ROLLBACK. Returned if a read-only connection cannot read the database because doing so would require it to roll back a hot-journal.
FossilOrigin-Name: 39247b14a52b0c0222fe5a848bf0aef0854058c4
2013-03-05 15:09:25 +00:00
dan
84fb4c22b9 Omit a test that uses the progress handler callback from view.test if OMIT_PROGRESS_HANDLER is defined.
FossilOrigin-Name: f40552ada57622825d2974d392356aa34612d5ee
2013-03-04 17:41:32 +00:00
drh
7015698b81 Add the test_fs.c test module to Makefile.in. Adjust the success criteria
on index5-1.3 so that it works under auto_vacuum configurations.

FossilOrigin-Name: b457c8870ac5ef58f2b7f8daed723c0cf0c07340
2013-03-03 20:26:46 +00:00
mistachkin
6e8a54fbd2 Prevent Tcl file encoding issues in the tests for the unicode() and char() functions.
FossilOrigin-Name: c9c2b82c86fff457a0b32d5be84ec66639065ae1
2013-03-01 23:13:37 +00:00
mistachkin
016fff2b6e In the incrvacuum3 test, add missing call to the Tcl close command.
FossilOrigin-Name: cd8067238439638bcfd3966d55d2a3990f36d702
2013-02-26 18:54:18 +00:00
drh
dd1dd489d9 When comparing names during name resolution, make sure the names match
exactly and that one name isn't merely a prefix of the other.
Fix for ticket [7a31705a7e6c95d51].

FossilOrigin-Name: c2d5a23b1ab39918e97c596cf75c42f86a5fe2b7
2013-02-26 12:57:42 +00:00
dan
9cf37e718c Change the way test script incrvacuum3.test copies database files in order to avoid trying to read the (locked) 512 byte 'pending-byte' region.
FossilOrigin-Name: fa1842e462049b1366909fe36d6d81b634be3953
2013-02-26 06:14:27 +00:00