]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
12 years agoExpand scope of the SQLITE_DISABLE_MMAP define for the Win32 VFS. winDisableMmap
mistachkin [Thu, 11 Apr 2013 22:52:44 +0000 (22:52 +0000)] 
Expand scope of the SQLITE_DISABLE_MMAP define for the Win32 VFS.

FossilOrigin-Name: daa168f3dad995c4b7dd60e7717db90639e167c2

12 years agoFor the multi-process tester on Win32, make use of the GetCurrentProcessId API.
mistachkin [Thu, 11 Apr 2013 21:13:10 +0000 (21:13 +0000)] 
For the multi-process tester on Win32, make use of the GetCurrentProcessId API.

FossilOrigin-Name: f1b524b9d9ea3db96d54ac55c39f15e6879085bd

12 years agoFix the xCheckReservedLock() method on the windows VFS so that it cannot
drh [Thu, 11 Apr 2013 18:28:55 +0000 (18:28 +0000)] 
Fix the xCheckReservedLock() method on the windows VFS so that it cannot
return a false positive when two or more processes use it at the same time
on the same file.  Ticket [7ff3120e4fa54abb55]

FossilOrigin-Name: dd3510bb20ade173c81c9874c05466011c8a249d

12 years agoFix pragma code generation so that it always outputs an OP_Trace opcode so
drh [Thu, 11 Apr 2013 13:26:18 +0000 (13:26 +0000)] 
Fix pragma code generation so that it always outputs an OP_Trace opcode so
that pragmas are shown in sqlite3_trace() output.

FossilOrigin-Name: 663f04bd48bc6f302230a22bd22b82bde2353943

12 years agoShow the process-id on log messages from mptester.
drh [Thu, 11 Apr 2013 11:53:45 +0000 (11:53 +0000)] 
Show the process-id on log messages from mptester.

FossilOrigin-Name: 6748a83dc5c02db37ecd963e678c5c69db142cac

12 years agoHave the UNIX VFS issue warnings via sqlite3_log() if a database file is
drh [Thu, 11 Apr 2013 01:16:15 +0000 (01:16 +0000)] 
Have the UNIX VFS issue warnings via sqlite3_log() if a database file is
renamed or unlinked or linked to more than one name while the file is open.

FossilOrigin-Name: e238dcf9189c029fbdcf89339e21d9cdd8fbf2c5

12 years agoEnhance multi-process tester integration with the Win32 API.
mistachkin [Thu, 11 Apr 2013 00:09:44 +0000 (00:09 +0000)] 
Enhance multi-process tester integration with the Win32 API.

FossilOrigin-Name: 0fdc743583c67a3a017b9ad812c62a5104b9aee7

12 years agoAdd new primary error codes SQLITE_NOTICE and SQLITE_WARNING for use with
drh [Wed, 10 Apr 2013 23:48:37 +0000 (23:48 +0000)] 
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

12 years agoAdd the sqlite3_strglob() interface.
drh [Wed, 10 Apr 2013 16:13:38 +0000 (16:13 +0000)] 
Add the sqlite3_strglob() interface.

FossilOrigin-Name: 41d6ff32a6dd1311dc3aabe5156335a64a886919

12 years agoUse symbolic names for tasks in mptester.
drh [Wed, 10 Apr 2013 12:01:21 +0000 (12:01 +0000)] 
Use symbolic names for tasks in mptester.

FossilOrigin-Name: f0d95afc73f8dbce8943dceb4a14b7de650c8823

12 years agoFix typo in name of mptest executable files in clean targets.
mistachkin [Wed, 10 Apr 2013 03:06:43 +0000 (03:06 +0000)] 
Fix typo in name of mptest executable files in clean targets.

FossilOrigin-Name: 4c7d9e1ed8722e0c75b5fdbeffb9030ccef0bd64

12 years agoCorrect test numbering on several rtree tests.
mistachkin [Wed, 10 Apr 2013 02:56:24 +0000 (02:56 +0000)] 
Correct test numbering on several rtree tests.

FossilOrigin-Name: 0adf8a3a4f2ca370568b35c9e8ce0e18f18701a2

12 years agoLimit integrity_check output to 10 lines in mptester scripts.
drh [Tue, 9 Apr 2013 20:04:09 +0000 (20:04 +0000)] 
Limit integrity_check output to 10 lines in mptester scripts.

FossilOrigin-Name: 67ee0dc0f4de5dc2ae92fb98932f1fdda3e76bdf

12 years agoChange the rollback journal so that it invokes sqlite3_log() make a record
drh [Tue, 9 Apr 2013 18:36:36 +0000 (18:36 +0000)] 
Change the rollback journal so that it invokes sqlite3_log() make a record
of a recovery, just as the WAL journal does.

FossilOrigin-Name: 7cd3f6cd3a39ed1c4bbf9e3508824150632c5bd9

12 years agoAdd extra #ifndef statements in os_unix.c and os_win.c to make sure the
drh [Tue, 9 Apr 2013 16:19:20 +0000 (16:19 +0000)] 
Add extra #ifndef statements in os_unix.c and os_win.c to make sure the
memory mapped I/O really is disabled when SQLITE_DISABLE_MMAP is set.

FossilOrigin-Name: c1e2523c9051782569291fff998140f7e0b70b6d

12 years agoDisable the use of memory-mapped I/O if the SQLITE_DISABLE_MMAP macro is
drh [Mon, 8 Apr 2013 20:47:49 +0000 (20:47 +0000)] 
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

12 years agoIn mptester, handle startScript no-change commits using a retry rather
drh [Mon, 8 Apr 2013 19:13:48 +0000 (19:13 +0000)] 
In mptester, handle startScript no-change commits using a retry rather
than grabbing an exclusive transaction.

FossilOrigin-Name: ae8bb24bfb014bdcb8aaa8159ddae0cd376afe99

12 years agoStill more tests using mptester. Added test cases that leave rollback
drh [Mon, 8 Apr 2013 18:58:00 +0000 (18:58 +0000)] 
Still more tests using mptester.  Added test cases that leave rollback
journals that must be recovered by other threads.

FossilOrigin-Name: 437b674f00610e2b925dc00ca27b5022e3858994

12 years agoAdding tests to the mptester scripts.
drh [Mon, 8 Apr 2013 17:57:26 +0000 (17:57 +0000)] 
Adding tests to the mptester scripts.

FossilOrigin-Name: e121adceb1e267e032dcbadb74eaa692a12a65bb

12 years agoChange mptester to avoid reporting SQLITE_BUSY errors if the busy handler
drh [Mon, 8 Apr 2013 15:36:51 +0000 (15:36 +0000)] 
Change mptester to avoid reporting SQLITE_BUSY errors if the busy handler
is turned off and the tracing level is set low.

FossilOrigin-Name: d77407ae6a9e09dea124dd59b14fdbbc36ed3d4e

12 years agoHandle the case in os_unix.c where SQLITE_FCNTL_MMAP_LIMIT requests that the mmap...
dan [Mon, 8 Apr 2013 15:30:41 +0000 (15:30 +0000)] 
Handle the case in os_unix.c where SQLITE_FCNTL_MMAP_LIMIT requests that the mmap limit be set to a value smaller than the current mapping.

FossilOrigin-Name: 360473493ec1a7094a2b1c5436f3b70914a6dfdd

12 years agoMerge the multi-process tester into trunk.
drh [Mon, 8 Apr 2013 14:41:34 +0000 (14:41 +0000)] 
Merge the multi-process tester into trunk.

FossilOrigin-Name: ea53c45d79772986d2ad289f4f56f333541747e7

12 years agoAdd the "mptester" target to the makefiles. Make mptester run with mptest
drh [Mon, 8 Apr 2013 14:28:33 +0000 (14:28 +0000)] 
Add the "mptester" target to the makefiles.  Make mptester run with
synchronous off by default.

FossilOrigin-Name: 1397830bfead3699a7e6b1858ae67ae15259b89e

12 years agoFix harmless compiler warnings in mptest.c.
drh [Mon, 8 Apr 2013 13:59:11 +0000 (13:59 +0000)] 
Fix harmless compiler warnings in mptest.c.

FossilOrigin-Name: 59bdbb10ed67bf79e0991e2ad58a28321dedb959

12 years agoAdd the vfsname() and eval() SQL functions to mptest.c.
drh [Mon, 8 Apr 2013 13:48:29 +0000 (13:48 +0000)] 
Add the vfsname() and eval() SQL functions to mptest.c.
Enhancements to the test/config01.test script.

FossilOrigin-Name: 91397a147ce4f67a7ea1182f06a7dda3a96ec465

12 years agoAdd --if, --else, --endif processing to mptest.c.
drh [Mon, 8 Apr 2013 13:13:43 +0000 (13:13 +0000)] 
Add --if, --else, --endif processing to mptest.c.

FossilOrigin-Name: 51265acae3088a51ac0ce6ab8731e6e15a48d4ae

12 years agoFix an incorrect type cast in an assignment in vdbe.c.
dan [Mon, 8 Apr 2013 10:38:57 +0000 (10:38 +0000)] 
Fix an incorrect type cast in an assignment in vdbe.c.

FossilOrigin-Name: 320b5295da57023399c7b9eed82eae40cf619803

12 years agoFix the --source command so that its argument is relative to the script.
drh [Sat, 6 Apr 2013 18:35:07 +0000 (18:35 +0000)] 
Fix the --source command so that its argument is relative to the script.
Verify that the SQLite header and library match.  Print SQLite version
and compile-time configuration information on startup.

FossilOrigin-Name: 15cb0db7583c3a24cbea0c72576047a93fba0801

12 years agoMerge trunk changes into the mptest branch. The mptest needs the
drh [Sat, 6 Apr 2013 18:10:27 +0000 (18:10 +0000)] 
Merge trunk changes into the mptest branch.  The mptest needs the
SQLITE_MAX_SCHEMA_RETRY fix in particular.

FossilOrigin-Name: fb7a7773965697855c12193408cb75300decc23c

12 years agoIncrease the default SQLITE_MAX_SCHEMA_RETRY to 50. Make sure that macro
drh [Sat, 6 Apr 2013 18:06:51 +0000 (18:06 +0000)] 
Increase the default SQLITE_MAX_SCHEMA_RETRY to 50.  Make sure that macro
covers every case where a prepared statement might need to be reprepared due
to a schema change.  The sqlite3_exec() interface now uses
sqlite3_prepare_v2().

FossilOrigin-Name: c1d7304c80c4a6244c8a9f6fad1eebd0f339c724

12 years agoAdd SQLITE_CONFIG_LOG error logging to the mptest program.
drh [Sat, 6 Apr 2013 14:30:29 +0000 (14:30 +0000)] 
Add SQLITE_CONFIG_LOG error logging to the mptest program.

FossilOrigin-Name: 716c25bd125c8934499c1fb59a60d7e844c0691c

12 years agoGet the build of mptest working on mac.
drh [Sat, 6 Apr 2013 14:16:41 +0000 (14:16 +0000)] 
Get the build of mptest working on mac.

FossilOrigin-Name: a0bae686c9d7f08afac00f66067f5147be6231e0

12 years agoGet the mptest program running on windows.
drh [Sat, 6 Apr 2013 14:04:22 +0000 (14:04 +0000)] 
Get the mptest program running on windows.

FossilOrigin-Name: 3966b33284355325afda627ed6f4e26f967438f8

12 years agoMany improvements to the mptest program. Added a simple test script.
drh [Sat, 6 Apr 2013 13:09:11 +0000 (13:09 +0000)] 
Many improvements to the mptest program.  Added a simple test script.

FossilOrigin-Name: 07b0401a9b61b1664fc6dcddac3b5969fc0f481a

12 years agoAdd tests to "permutations.test coverage-pager" to cover uncovered branches.
dan [Sat, 6 Apr 2013 11:03:09 +0000 (11:03 +0000)] 
Add tests to "permutations.test coverage-pager" to cover uncovered branches.

FossilOrigin-Name: 07a0e4e9820a85bf1690214fef3577866c763f92

12 years agoAdd a prototype TH3-script-style test harness that starts multiple processes
drh [Sat, 6 Apr 2013 00:19:37 +0000 (00:19 +0000)] 
Add a prototype TH3-script-style test harness that starts multiple processes
operating on the same database file at the same time.

FossilOrigin-Name: c318fafe686120d7fb8e487eb3bb4942d497665c

12 years agoImprove the code coverage of "permutations.test coverage-pager".
dan [Fri, 5 Apr 2013 20:40:43 +0000 (20:40 +0000)] 
Improve the code coverage of "permutations.test coverage-pager".

FossilOrigin-Name: b095e2cdb61ca8487255687f58fb1024d40f3986

12 years agoAdd further multi-client tests to mmap1.test.
dan [Thu, 4 Apr 2013 19:32:53 +0000 (19:32 +0000)] 
Add further multi-client tests to mmap1.test.

FossilOrigin-Name: a107f75d93b8acd3403d8473a75137378041a833

12 years agoDisable memory-mapped I/O for the win32lock.test module
drh [Thu, 4 Apr 2013 17:28:11 +0000 (17:28 +0000)] 
Disable memory-mapped I/O for the win32lock.test module

FossilOrigin-Name: 2b3d9805a28e51f646113e22c2dff2272342306e

12 years agoUpdates to the file-control documentation. No changes to code.
drh [Thu, 4 Apr 2013 01:54:10 +0000 (01:54 +0000)] 
Updates to the file-control documentation.  No changes to code.

FossilOrigin-Name: 51fab480d0487107709e6c9e00bc0512b82ef1aa

12 years agoIncrease the version number to 3.7.17.
drh [Thu, 4 Apr 2013 00:51:14 +0000 (00:51 +0000)] 
Increase the version number to 3.7.17.

FossilOrigin-Name: 5c8c5a2a12f3f5e29c91c4d16e8b4afd4307354e

12 years agoTry to use mmap() to speed access to the database file on windows, linux,
drh [Thu, 4 Apr 2013 00:40:17 +0000 (00:40 +0000)] 
Try to use mmap() to speed access to the database file on windows, linux,
and mac.

FossilOrigin-Name: fff2be60779571c8fb89158db976ec3755e9a223

12 years agoRelease resources prior to bailing out of the btreeCreateTable() routine experimental-mmap
drh [Wed, 3 Apr 2013 21:23:28 +0000 (21:23 +0000)] 
Release resources prior to bailing out of the btreeCreateTable() routine
following an OOM error.

FossilOrigin-Name: b2a72be9bab77f050bef75477a278a6294d3e854

12 years agoRemove an unreachable branch in the direct blob I/O logic of btree.c.
drh [Wed, 3 Apr 2013 20:04:04 +0000 (20:04 +0000)] 
Remove an unreachable branch in the direct blob I/O logic of btree.c.

FossilOrigin-Name: f97d7274f48e3bb98ed17eae11abb55064134874

12 years agoFix a bug in the detection of iOS when setting the default mmap_limit.
drh [Wed, 3 Apr 2013 13:38:46 +0000 (13:38 +0000)] 
Fix a bug in the detection of iOS when setting the default mmap_limit.

FossilOrigin-Name: ac1432b3a8e968be4cbc138b4a35f34187c0c36f

12 years agoChange the mmap_limit pragma to report the new limit, or to report the
drh [Wed, 3 Apr 2013 13:09:18 +0000 (13:09 +0000)] 
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

12 years agoRemove the restriction on using xFetch to load the root pages of tables and indexes...
dan [Wed, 3 Apr 2013 11:52:16 +0000 (11:52 +0000)] 
Remove the restriction on using xFetch to load the root pages of tables and indexes. It appears to have been based on a misconception.

FossilOrigin-Name: 5b082efead488a2fccc18171e640e0aa5252d1d0

12 years agoWhen moving a page to make way for the root page of a new table or index in an auto...
dan [Wed, 3 Apr 2013 11:38:36 +0000 (11:38 +0000)] 
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

12 years agoIn btree.c, save the positions of other cursors open on the same table when writing...
dan [Wed, 3 Apr 2013 11:17:39 +0000 (11:17 +0000)] 
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

12 years agoInitialize the mmap_limit of temporary files to the configured mmap_limit.
drh [Wed, 3 Apr 2013 10:50:02 +0000 (10:50 +0000)] 
Initialize the mmap_limit of temporary files to the configured mmap_limit.

FossilOrigin-Name: 24bab7596bb7385981a5d331df5eeb05353547f7

12 years agoMake use of xFetch, if it is available when doing a VACUUM or a backup.
drh [Wed, 3 Apr 2013 03:53:15 +0000 (03:53 +0000)] 
Make use of xFetch, if it is available when doing a VACUUM or a backup.

FossilOrigin-Name: 83bc37af07857960c11275891f853a358dcbbf05

12 years agoAdd the -mmap option to the command-line shell, for setting the default
drh [Wed, 3 Apr 2013 01:26:54 +0000 (01:26 +0000)] 
Add the -mmap option to the command-line shell, for setting the default
mmap_limit.

FossilOrigin-Name: fc30d06c94c8212abb0477fb4cec4520d05bea34

12 years agoFix the unix driver to check defined(_BSD_SOURCE) rather than just the plain
drh [Wed, 3 Apr 2013 00:42:01 +0000 (00:42 +0000)] 
Fix the unix driver to check defined(_BSD_SOURCE) rather than just the plain
_BSD_SOURCE macro.  This fixes the build for OpenBSD.

FossilOrigin-Name: 1dd42ef4144ee08fb4ee1676d934a56a0e34bac2

12 years agoFix a resource leak in os_unix.c.
dan [Tue, 2 Apr 2013 20:55:01 +0000 (20:55 +0000)] 
Fix a resource leak in os_unix.c.

FossilOrigin-Name: b29cda03fe4e8d8f5b5acbbea2d69f284a2bdf23

12 years agoAdjustments to mmap1.test so that it works better on windows. It still gets
drh [Tue, 2 Apr 2013 20:29:33 +0000 (20:29 +0000)] 
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

12 years agoFix a bug in mmap2.test that was leaving an invalid sqlite3_log() callback installed...
dan [Tue, 2 Apr 2013 20:19:22 +0000 (20:19 +0000)] 
Fix a bug in mmap2.test that was leaving an invalid sqlite3_log() callback installed, causing a crash.

FossilOrigin-Name: c0cdaa07355f51bd217881b5b91ec2a609fa56f4

12 years agoAdd assert to the Windows VFS pertaining to the size of the SIZE_T type.
mistachkin [Tue, 2 Apr 2013 20:13:04 +0000 (20:13 +0000)] 
Add assert to the Windows VFS pertaining to the size of the SIZE_T type.

FossilOrigin-Name: 4eeea58354e21797ca1f4dc4ea785d0330381f0b

12 years agoAdd test cases to mmap1.test and pagerfault.test.
dan [Tue, 2 Apr 2013 18:33:55 +0000 (18:33 +0000)] 
Add test cases to mmap1.test and pagerfault.test.

FossilOrigin-Name: 3050136be962427cc4dcced6077ef29b2a941405

12 years agoChange an assert in pager.c to acknowledge that it is possible for sqlite3PagerRollba...
dan [Tue, 2 Apr 2013 18:31:29 +0000 (18:31 +0000)] 
Change an assert in pager.c to acknowledge that it is possible for sqlite3PagerRollback() to return SQLITE_CORRUPT.

FossilOrigin-Name: d641d3d20d80fdb86d91de31fcf2eb5ca3c5c715

12 years agoFix the build for Mac.
drh [Tue, 2 Apr 2013 18:25:04 +0000 (18:25 +0000)] 
Fix the build for Mac.

FossilOrigin-Name: d36ce0bbad58445c983597ee93438fe07b659cdc

12 years agoAdd new test file btreefault.test.
dan [Tue, 2 Apr 2013 15:37:30 +0000 (15:37 +0000)] 
Add new test file btreefault.test.

FossilOrigin-Name: 7fe908afeba16f64edc16824c67b396138581a8f

12 years agoFix a faulty assert() in the os_win.c VFS.
drh [Tue, 2 Apr 2013 14:37:40 +0000 (14:37 +0000)] 
Fix a faulty assert() in the os_win.c VFS.

FossilOrigin-Name: fd6ee54969322203c02ce9bd8744e095faf6a69c

12 years agoIf the SQLITE_TRACE_SIZE_LIMIT compile-time parameter is set to a positive
drh [Tue, 2 Apr 2013 13:56:53 +0000 (13:56 +0000)] 
If the SQLITE_TRACE_SIZE_LIMIT compile-time parameter is set to a positive
integer then limit the expansion of strings and blobs in trace output to
approximately that many bytes.

FossilOrigin-Name: e5b710849dd66673ba0e0d935b103cb29abfcc4b

12 years agoAdd test cases for errors in mmap() or mremap() is os_unix.c.
dan [Tue, 2 Apr 2013 12:04:09 +0000 (12:04 +0000)] 
Add test cases for errors in mmap() or mremap() is os_unix.c.

FossilOrigin-Name: 3098a3c1e7305033904a496ef534cb312a876fab

12 years agoProposed template preprocessor magic for activating mmap only on platforms
drh [Tue, 2 Apr 2013 10:29:13 +0000 (10:29 +0000)] 
Proposed template preprocessor magic for activating mmap only on platforms
where we know it works.

FossilOrigin-Name: d96272f031102514b02bd839aac9e37618872200

12 years agoReorder two conditions to make coverage testing easier.
drh [Tue, 2 Apr 2013 01:45:10 +0000 (01:45 +0000)] 
Reorder two conditions to make coverage testing easier.

FossilOrigin-Name: 793ba4e996426522eeaa86589a9e974fa1fc1522

12 years agoRemove an unreachable condition from pager.c.
drh [Tue, 2 Apr 2013 00:41:18 +0000 (00:41 +0000)] 
Remove an unreachable condition from pager.c.

FossilOrigin-Name: 3628e86bf131cb205f08a4b299d84007cd6b25c3

12 years agoAlways send the SQLITE_FCNTL_MMAP_LIMIT pragma to the VFS, even if the limit
drh [Tue, 2 Apr 2013 00:15:23 +0000 (00:15 +0000)] 
Always send the SQLITE_FCNTL_MMAP_LIMIT pragma to the VFS, even if the limit
is zero and even if the VFS does not support xFetch().

FossilOrigin-Name: 01ffdabbad30f1c157f2b33b1e85ee4d6c4632dd

12 years agoRemove a debugging printf() accidently left in the previous check-in.
drh [Mon, 1 Apr 2013 22:42:48 +0000 (22:42 +0000)] 
Remove a debugging printf() accidently left in the previous check-in.

FossilOrigin-Name: 8198cdd8ac5dcc1c677fffa869ac965186b96abf

12 years agoAdd the SQLITE_CONFIG_MMAP_LIMIT configuration option for overriding the
drh [Mon, 1 Apr 2013 22:38:06 +0000 (22:38 +0000)] 
Add the SQLITE_CONFIG_MMAP_LIMIT configuration option for overriding the
SQLITE_DEFAULT_MMAP_LIMIT compile-time setting.  Enhance "PRAGMA mmap_limit"
so that without a specific database name, it sets the limit on all database
files and changes the default for any future databases that might be added
using ATTACH.

FossilOrigin-Name: 78141d0a16dd1d56b575fccd149de7fa789cb06c

12 years agoAdd a comment to xUnfetch on windows to say that the call to winUnmapfile()
drh [Mon, 1 Apr 2013 18:25:48 +0000 (18:25 +0000)] 
Add a comment to xUnfetch on windows to say that the call to winUnmapfile()
might be unnecessary.

FossilOrigin-Name: e3c63c31a21b27806592d066a013a111b280c61f

12 years agoIn windows, round down the size of the memory mapped region to the next
drh [Mon, 1 Apr 2013 18:15:50 +0000 (18:15 +0000)] 
In windows, round down the size of the memory mapped region to the next
smaller multiple of the page size.

FossilOrigin-Name: 0e44ed1badde6d766f18d1373d968e5b286b15bd

12 years agoMerge accidental fork.
dan [Mon, 1 Apr 2013 17:58:10 +0000 (17:58 +0000)] 
Merge accidental fork.

FossilOrigin-Name: 5f4437c0e35c8aa740515aac3e81e0146716d2bb

12 years agoAttempt to emulate mremap() on non-Linux systems by allocating a second mapping immed...
dan [Mon, 1 Apr 2013 17:56:59 +0000 (17:56 +0000)] 
Attempt to emulate mremap() on non-Linux systems by allocating a second mapping immediately following the first in virtual memory.

FossilOrigin-Name: 4d67433db8fb4754ae6b192945e479f3d7bad579

12 years agoBug fix in the winMapfile() subroutine: Be sure to record the map object
drh [Mon, 1 Apr 2013 17:56:28 +0000 (17:56 +0000)] 
Bug fix in the winMapfile() subroutine:  Be sure to record the map object
handle in the sqlite3_file object.

FossilOrigin-Name: ee4d188e207efa24a26776fa4f025c6ac39cce73

12 years agoAdd xFetch and xUnfetch methods to the os_win.c VFS.
drh [Mon, 1 Apr 2013 17:22:51 +0000 (17:22 +0000)] 
Add xFetch and xUnfetch methods to the os_win.c VFS.

FossilOrigin-Name: a1653a257d6af6e8b10c819e68b12f6c2f485811

12 years agoEnsure that a checkpoint does not use an out-of-date mapping.
dan [Mon, 1 Apr 2013 16:56:41 +0000 (16:56 +0000)] 
Ensure that a checkpoint does not use an out-of-date mapping.

FossilOrigin-Name: a1040f0397d57855500926494c978623286ddc77

12 years agoFix a typo in a log message in wal.c.
dan [Mon, 1 Apr 2013 14:35:01 +0000 (14:35 +0000)] 
Fix a typo in a log message in wal.c.

FossilOrigin-Name: 83fc48d16572443373e5de62adbd4cd53c2f7786

12 years agoFix a problem in btree.c that could cause a crash following an OOM.
dan [Mon, 1 Apr 2013 14:29:33 +0000 (14:29 +0000)] 
Fix a problem in btree.c that could cause a crash following an OOM.

FossilOrigin-Name: b724aa5889f2e09cf0cbef133a672e6486755104

12 years agoFor the clean target, tidy up a couple more generated (or copied) source files.
mistachkin [Fri, 29 Mar 2013 19:52:04 +0000 (19:52 +0000)] 
For the clean target, tidy up a couple more generated (or copied) source files.

FossilOrigin-Name: 5687e5ee7bafa00d2b353c3eda1e5dfb219cb185

12 years agoVersion 3.7.16.1 version-3.7.16.1
drh [Fri, 29 Mar 2013 13:44:34 +0000 (13:44 +0000)] 
Version 3.7.16.1

FossilOrigin-Name: 527231bc67285f01fb18d4451b28f61da3c4e39d

12 years agoAdjustment to an extreme corner case in the sqlite3Atoi64() routine.
drh [Thu, 28 Mar 2013 11:40:14 +0000 (11:40 +0000)] 
Adjustment to an extreme corner case in the sqlite3Atoi64() routine.

FossilOrigin-Name: 39534b4baa53b9360696a9d5ee8cc2108af34592

12 years agoFix harmless compiler warnings coming from MSVC64 in test code. No
drh [Wed, 27 Mar 2013 20:41:15 +0000 (20:41 +0000)] 
Fix harmless compiler warnings coming from MSVC64 in test code.  No
changes to the core.

FossilOrigin-Name: 274d2a22660c7b34b8bbd85f3c29cbafbcb1b4e7

12 years agoIncrement the version number to 3.7.16.1.
drh [Wed, 27 Mar 2013 19:46:33 +0000 (19:46 +0000)] 
Increment the version number to 3.7.16.1.

FossilOrigin-Name: 7e32eb7b66290ba7323520f7ea92ffa584ee7193

12 years agoIn order to optimize out the ORDER BY clause,
drh [Wed, 27 Mar 2013 17:20:10 +0000 (17:20 +0000)] 
In order to optimize out the ORDER BY clause,
outer loops must generate values for ORDER BY terms that are unique or else
the inner loops must generate no more than a single row.
Fix for ticket [a179fe7465].

FossilOrigin-Name: 2936f7466e162dfb003bda26d35358d1b3063112

12 years agoRestore additional ORDER BY optimizations that where broken by the orderby-fix
drh [Wed, 27 Mar 2013 16:42:21 +0000 (16:42 +0000)] 
Restore additional ORDER BY optimizations that where broken by the
recent ORDER BY fix.

FossilOrigin-Name: c77ee6e20d3a8c91a8bf4c9063c36a95c70e17cf

12 years agoImproved optimization of ORDER BY.
drh [Wed, 27 Mar 2013 16:05:30 +0000 (16:05 +0000)] 
Improved optimization of ORDER BY.

FossilOrigin-Name: 97e5c70f2f19a1bca70dd2221b757b9e5418fce0

12 years agoA fix an test-case for the ORDER BY problem identified by ticket [a179fe7465].
drh [Wed, 27 Mar 2013 15:04:28 +0000 (15:04 +0000)] 
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

12 years agoCandidate fix for ticket [6bfb98dfc0c]: Make sure invalid cursors drop all
drh [Wed, 27 Mar 2013 03:15:23 +0000 (03:15 +0000)] 
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

12 years agoFix a comment in os_unix.c. No code changes.
drh [Tue, 26 Mar 2013 18:48:11 +0000 (18:48 +0000)] 
Fix a comment in os_unix.c.  No code changes.

FossilOrigin-Name: 72813b8ec924b91583c679668f7c4561dff82a02

12 years agoChange the name of the Pager.pFree field to Pager.pMmapFreelist.
drh [Tue, 26 Mar 2013 14:36:11 +0000 (14:36 +0000)] 
Change the name of the Pager.pFree field to Pager.pMmapFreelist.

FossilOrigin-Name: 611bd824c24a60d298f28705de323fa2e813a308

12 years agoIn btree.c, save the positions of any open cursors before moving any pages around...
dan [Tue, 26 Mar 2013 14:16:20 +0000 (14:16 +0000)] 
In btree.c, save the positions of any open cursors before moving any pages around to auto-vacuum the database on commit.

FossilOrigin-Name: 30c0a69363931a72d1c34e5be71646932398d172

12 years agoPrevious check-in accidently left mmap turned off by default. This checkin
drh [Tue, 26 Mar 2013 01:07:50 +0000 (01:07 +0000)] 
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

12 years agoMemory-mapped I/O is now on by default. The "PRAGMA mmap_limit(N)" can be
drh [Mon, 25 Mar 2013 23:09:28 +0000 (23:09 +0000)] 
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

12 years agoAdd munmap and mremap to the set of os interfaces that can be overloaded
drh [Mon, 25 Mar 2013 20:50:25 +0000 (20:50 +0000)] 
Add munmap and mremap to the set of os interfaces that can be overloaded
in os_unix.c.

FossilOrigin-Name: 8776047bd776bbf266eb9c3b56683badb84ae73e

12 years agoUse mremap() on Linux.
dan [Mon, 25 Mar 2013 20:30:13 +0000 (20:30 +0000)] 
Use mremap() on Linux.

FossilOrigin-Name: 431aecc8600c29c203546e48d256510510238887

12 years agoMerge all recent trunk changes into the experimental-mmap branch.
drh [Mon, 25 Mar 2013 19:57:26 +0000 (19:57 +0000)] 
Merge all recent trunk changes into the experimental-mmap branch.

FossilOrigin-Name: a607d63f0b6a3d3785e9385187d3e6b92e14fc70

12 years agoAdd a test that simulates an error in mmap().
dan [Mon, 25 Mar 2013 19:05:07 +0000 (19:05 +0000)] 
Add a test that simulates an error in mmap().

FossilOrigin-Name: 6ec7367d8e98425f00eeb8215ca8964313c1d0b7

12 years agoSimulate OOM errors in the sqlite3OsFetch() function. Run malloc.test as part of...
dan [Mon, 25 Mar 2013 18:25:49 +0000 (18:25 +0000)] 
Simulate OOM errors in the sqlite3OsFetch() function. Run malloc.test as part of the "mmap" permutation.

FossilOrigin-Name: 77443ef2cd0b29b7822eea544ab8c6c4a93cb67b

12 years agoChange the signature of the xUnfetch method to "int (*xUnfetch)(sqlite3_file*, sqlite...
dan [Mon, 25 Mar 2013 17:00:24 +0000 (17:00 +0000)] 
Change the signature of the xUnfetch method to "int (*xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p)".

FossilOrigin-Name: 115b830509e8f0aa9d5965c1e9cd4f2ed9d01938