Commit Graph

10628 Commits

Author SHA1 Message Date
mistachkin
2753388e8a In the winMremap VFS function, unmap the region prior to attempting to truncate the file.
FossilOrigin-Name: 8870c4cc6cda07154936644f7df25bd81d6ba38a
2013-03-23 12:15:27 +00:00
mistachkin
46fce002d9 Do not unmap the mapped file region in winTruncate as there may be outstanding pointers to it.
FossilOrigin-Name: f57a9c91e993f76ce8b923e06e721414980e8e61
2013-03-23 10:09:46 +00:00
mistachkin
daf9a5a402 Preliminary changes to support the xMremap VFS method on Windows.
FossilOrigin-Name: 75a85a1c6ac59f2d021c28fa2161afb1118deea4
2013-03-23 09:56:39 +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
drh
23f29ec628 Fix a potential NULL-pointer dereference in btreeSwapOutMmap().
FossilOrigin-Name: e81ccdcd87a1387f7ca08d4d7c899311e2180d32
2013-03-22 19:56:27 +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
dan
99bd10979a Allow the database file to be memory mapped in wal mode.
FossilOrigin-Name: d190ddabc386bc9654b99e33fb81b2f6e67b54d6
2013-03-22 18:20:14 +00:00
dan
c00033125d Add a fix for the assert() statements added by the previous commit.
FossilOrigin-Name: 19345416ed5e1ab5b0b35993b0b9069c2fb1683b
2013-03-22 17:46:11 +00:00
dan
6101d50471 Add assert statements to os_unix.c to ensure that any mapped region of the database file is not being read or written using the xRead() or xWrite() methods.
FossilOrigin-Name: 765615f9fba7c1765eb741cb98a09a28b464ee55
2013-03-22 08:58:38 +00:00
dan
b26e6c14fe Fix cases where xRead() was being used to read from a memory mapped part of the database file.
FossilOrigin-Name: 5c9e9df27b9f2c46cd55388a858d4e78ee564975
2013-03-21 20:39:55 +00:00
dan
7c49427fc2 Avoid calling xRead() on a part of the database file that is memory mapped.
FossilOrigin-Name: c8eac290a7240d69494bd0dad5ed1fdc2505f703
2013-03-21 20:00:07 +00:00
dan
5b068f8632 Fix a problem when opening a write-transaction while there exist read-only b-tree cursors in mmap mode.
FossilOrigin-Name: 32e0bbb73609ac3ad096a60f1de3095bc79fb0cc
2013-03-21 15:57:32 +00:00
dan
c71b45e619 Do not use the Linux mremap() call. Use the same strategy for xMremap() as on OSX instead.
FossilOrigin-Name: 5ed8ad780c991d2ca44003ee84350fb5e95ad58e
2013-03-21 14:47:47 +00:00
dan
d306e1a3a1 Optimize the xMremap method in os_unix.c some.
FossilOrigin-Name: 9529ed88a71fee02fae72dc86f0669bd6856ff92
2013-03-20 18:25:49 +00:00
dan
eb97b29345 When possible, use memory mapping when appending new pages to a database file.
FossilOrigin-Name: 14135da3cdbafd699563a29608f32347cda28338
2013-03-20 14:26:59 +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
a72014faf5 When possible, use memcpy() to and from the mapped region instead of xWrite() and xRead().
FossilOrigin-Name: f8ca5622d99bedca957caa9ad311d798f63b3ce9
2013-03-16 20:19:21 +00:00
dan
7af6547a5a Fix a dropped error code in pager.c.
FossilOrigin-Name: 022fdc986b33701abfd39621072ac3d9f9f7d43e
2013-03-15 19:13:42 +00:00
dan
11dcd11913 Allow read-only cursors to use mmap pages even if there is an open write transaction.
FossilOrigin-Name: b387e2f9d24dccac1fd040e309f6fc7ec1cfffba
2013-03-15 18:29:18 +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
b19cad6b94 Fix the ORDER BY with IN constraint logic so that it works with all
combinations of DESC on the ORDER BY clause, on the RHS of the IN operator,
and in the index used by ORDER BY and IN.  
Fix for ticket [4dd95f6943fbd18].

FossilOrigin-Name: 839aa91faf1db7025d90fa3c65e50efb829b053b
2013-03-13 00:13:25 +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
mistachkin
706627b870 Fix typo in sqlite3_close() function documentation reported on the mailing list.
FossilOrigin-Name: c9a75d890f06cf3806d7b8879824a11d3a8e7016
2013-03-12 23:03: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
mistachkin
f5840160b7 Fix typo in sqlite3_close() function documentation reported on the mailing list.
FossilOrigin-Name: 7232093d6c6871a9f4ea155ab215e3b39c1c322d
2013-03-12 20:58:21 +00:00
drh
1ccce44937 Fix the ORDER BY optimization with IN constraints when the RHS of the
IN constraint is a descending index.

FossilOrigin-Name: 62316ebaca933f7e5df2018e8360a2b74234f30a
2013-03-12 20:38:51 +00:00
drh
d383216383 Revise the patch to make it easier to understand.
FossilOrigin-Name: 3ce7eb0265b5be4e23264ae41332b947011ff1ad
2013-03-12 18:49:25 +00:00
dan
d7e8689078 Add test cases for [4dd95f6943].
FossilOrigin-Name: 723c144c76fc171e5d19072d6d42a08013921ec6
2013-03-12 18:44:49 +00:00
drh
7a3e147ee2 Revised fix for the DESC ORDER BY and IN constraint bug,
ticket [4dd95f6943fbd18].  The previous check-in was incorrect.

FossilOrigin-Name: 8b2eb7a43b4580f04c14ea8600cf080e0e7f384d
2013-03-12 18:40:20 +00:00
drh
0fe456bb29 A proposed fix for the DESC ORDER BY bug of ticket [4dd95f6943fbd18].
Seems to work, but lots more testing is needed prior to moving to trunk.

FossilOrigin-Name: 614a038ad2fe111687d2bc1c0aa716d7eb8fdd7c
2013-03-12 18:34:50 +00:00
dan
881bd79293 Define _BSD_SOURCE when building on OpenBSD. This is required for fchmod().
FossilOrigin-Name: f9027cb47bdec8dcebf1f038921b28d9e9928c18
2013-03-11 13:37:52 +00:00
dan
b606ec52c7 Fixes for compiling with SQLITE_OMIT_AUTOVACUUM and/or SQLITE_OMIT_TRIGGER defined.
FossilOrigin-Name: 1da15adba8f6eec69c24ec6385d6f1a7905a388f
2013-03-11 11:57:30 +00:00
dan
09ff9e1664 Fixes for compiling with SQLITE_OMIT_AUTOVACUUM and/or SQLITE_OMIT_TRIGGER defined.
FossilOrigin-Name: 938b91e8552516772060d4e55e2f79cca4c13e27
2013-03-11 11:49:03 +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
dan
994ff6f587 If SQLITE_OMIT_UTF16 is defined, avoid setting the 'enc' field of Schema objects to any value except SQLITE_UTF8. Otherwise, assert() statements may fail or spurious SQLITE_NOMEM errors may be returned at the vdbe level later on.
FossilOrigin-Name: f2fecfb2d32cf666e16a87032042dc163ac30250
2013-03-08 18:16:33 +00:00
dan
dbd4d5fc77 If SQLITE_OMIT_UTF16 is defined, avoid setting the 'enc' field of Schema objects to any value except SQLITE_UTF8. Otherwise, assert() statements may fail or spurious SQLITE_NOMEM errors may be returned at the vdbe level later on.
FossilOrigin-Name: 69746ef787680a4b7590bd1d3c86b229d9d0dac4
2013-03-08 07:10:37 +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
mistachkin
ef593f293e Fix two compilation issues, one warning and one error, that occur only when SQLITE_OMIT_UTF16 is defined.
FossilOrigin-Name: 10ace06be7fbe9a76a201c418b2af453c7a69043
2013-03-07 06:42:53 +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
drh
a0272d8255 Add the SQLITE_READONLY_ROLLBACK extended error code.
Do not try to set the permissions on journal or wal files except if the
filesize is initially zero (indicating that it is a new file.)

FossilOrigin-Name: ce4ac66a4b623a3cee1a63089dd5ba8341244f1e
2013-03-06 01:48:20 +00:00
drh
cfc176973e Fix an operator precedence problem on the [1d8086902e] check-in.
FossilOrigin-Name: 4f5f3aebe81c3cbe539db3e33ec38fa3de47e90b
2013-03-06 01:41:53 +00:00
dan
77dfe91662 Merge experimental branch with trunk.
FossilOrigin-Name: 4e6e07a60e543d5d1727cde27ab11e156202a1b8
2013-03-05 16:54:45 +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
e1df4e31ec Fix a bug in the recent incremental-vacuum related changes.
FossilOrigin-Name: 717863fca6d58828bf9321bc8b169e385ad4263f
2013-03-05 11:27:04 +00:00