]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
12 years agoWork around compilation issue with MSVC.
mistachkin [Fri, 16 May 2014 23:15:50 +0000 (23:15 +0000)] 
Work around compilation issue with MSVC.

FossilOrigin-Name: 9623a29c11e3a90513016ea3306c085d2bf91b62

12 years agoRearrange some conditionals and add #if statements to make the code more
drh [Fri, 16 May 2014 20:24:51 +0000 (20:24 +0000)] 
Rearrange some conditionals and add #if statements to make the code more
testable.

FossilOrigin-Name: 17afd77057f8695733a9a60225646c1d8813b1a0

12 years agoAdd a pair of sqlite3FaultSim(100) calls to vdbesort.c to facilitate testing
drh [Fri, 16 May 2014 17:31:42 +0000 (17:31 +0000)] 
Add a pair of sqlite3FaultSim(100) calls to vdbesort.c to facilitate testing
of obscure and hard to reach error conditions.

FossilOrigin-Name: cceac14fd83ddd8f868c1767cdc66635607cb159

12 years agoFixes to prevent an FTS index from growing indefinitely as the corresponding table...
dan [Fri, 16 May 2014 16:16:59 +0000 (16:16 +0000)] 
Fixes to prevent an FTS index from growing indefinitely as the corresponding table is updated. Change the FTS 'automerge' option to allow the user to specify the number of segments that should be merged simultaneously by auto-merges.

FossilOrigin-Name: a75f1800021d30b712053373440041b7b355a36a

12 years agoAdd extra test to backcompat.test to ensure that old and new versions of FTS may... fts4-experimental
dan [Fri, 16 May 2014 15:48:17 +0000 (15:48 +0000)] 
Add extra test to backcompat.test to ensure that old and new versions of FTS may work together on the same incremental merge operation.

FossilOrigin-Name: 3997d47bb9c8593a2cd30317ea65163b99db1832

12 years agoMerge all recent changes from trunk, and especially the new sqlite3FaultSim()
drh [Fri, 16 May 2014 14:27:05 +0000 (14:27 +0000)] 
Merge all recent changes from trunk, and especially the new sqlite3FaultSim()
interface.

FossilOrigin-Name: 43fcbd9116401f30781fdcbe55d1674d6b96311b

12 years agoRepurpose the SQLITE_TESTCTRL_FAULT_INSTALL test-control to register a
drh [Fri, 16 May 2014 14:17:01 +0000 (14:17 +0000)] 
Repurpose the SQLITE_TESTCTRL_FAULT_INSTALL test-control to register a
callback to be invoked by sqlite3FaultSim().  That test-control has been
unused since 2008-06-20 and was never used in any official release.

FossilOrigin-Name: 0d43a7ad9abe821e33e0bf83a997aa4461b1e3f2

12 years agoUse #ifdef logic to avoid an always-true branch when
drh [Fri, 16 May 2014 12:18:08 +0000 (12:18 +0000)] 
Use #ifdef logic to avoid an always-true branch when
SQLITE_MAX_WORKER_THREADS=0

FossilOrigin-Name: 88cfe6d7de5f19f484304d0db585eac5de6c00ae

12 years agoFix a bug causing an incorrect segment size value to be stored if both an old and...
dan [Fri, 16 May 2014 10:30:44 +0000 (10:30 +0000)] 
Fix a bug causing an incorrect segment size value to be stored if both an old and new FTS version performed work on the same incremental merge operation.

FossilOrigin-Name: a9a2aeab298ba2ac0b8835e61406e2d83bf7e39b

12 years agoMerge latest trunk changes with this branch.
dan [Thu, 15 May 2014 19:05:55 +0000 (19:05 +0000)] 
Merge latest trunk changes with this branch.

FossilOrigin-Name: 5809986ffcc5d9cbab64760f8d7fbfbb6b626ee7

12 years agoFix a problem with the handling of delete markers by automerge on large databases.
dan [Thu, 15 May 2014 18:36:39 +0000 (18:36 +0000)] 
Fix a problem with the handling of delete markers by automerge on large databases.

FossilOrigin-Name: 2b09bd17eb85ea3c682e930d2aabc6441f2265e0

12 years agoUse #ifdef to omit code that is not used when SQLITE_MAX_WORKER_THREADS is zero.
drh [Thu, 15 May 2014 16:56:56 +0000 (16:56 +0000)] 
Use #ifdef to omit code that is not used when SQLITE_MAX_WORKER_THREADS is zero.

FossilOrigin-Name: 2e8d287d4f41d395a488bf65b20e956b0e311177

12 years agoDo not search for promotable segments following an FTS 'optimize' operation or creati...
dan [Wed, 14 May 2014 19:49:17 +0000 (19:49 +0000)] 
Do not search for promotable segments following an FTS 'optimize' operation or creation of a new segment on the oldest existing level.

FossilOrigin-Name: 34f6b4b8e4cb8ea45fd518672dc96335d1ce06ab

12 years agoFix a problem to do with loading the value of the FTS automerge setting from the...
dan [Wed, 14 May 2014 18:45:27 +0000 (18:45 +0000)] 
Fix a problem to do with loading the value of the FTS automerge setting from the database.

FossilOrigin-Name: 7268119f74602929b372b88eca7b3c3b4964f7d5

12 years agoFix various problems to do with segment promotion. Add test file fts4growth2.test...
dan [Wed, 14 May 2014 15:58:47 +0000 (15:58 +0000)] 
Fix various problems to do with segment promotion. Add test file fts4growth2.test, containing tests to check that the FTS index does not grow indefinitely as the table is updated.

FossilOrigin-Name: 21491a9bc686e63bec32f1a67103622f1160a2f9

12 years agoFix a problem preventing delete markers from ever being removed from the FTS index.
dan [Tue, 13 May 2014 20:11:37 +0000 (20:11 +0000)] 
Fix a problem preventing delete markers from ever being removed from the FTS index.

FossilOrigin-Name: 7f47ae5c5ddb1227484ddae7c6960183932a052a

12 years agoImprove a comment in the MSVC makefile. No changes to code.
mistachkin [Mon, 12 May 2014 22:36:50 +0000 (22:36 +0000)] 
Improve a comment in the MSVC makefile.  No changes to code.

FossilOrigin-Name: 0901dccedaf5679691ba803ec76d113de170185d

12 years agoAdd VSIX packaging support for Windows Phone 8.1 using Visual Studio 2013 Update 2.
mistachkin [Mon, 12 May 2014 21:12:04 +0000 (21:12 +0000)] 
Add VSIX packaging support for Windows Phone 8.1 using Visual Studio 2013 Update 2.

FossilOrigin-Name: 013738f3d531078fb47f9992c18a0d630e771a32

12 years agoExperimental code to prevent FTS indexes from growing indefinitely as the table is...
dan [Mon, 12 May 2014 20:04:48 +0000 (20:04 +0000)] 
Experimental code to prevent FTS indexes from growing indefinitely as the table is updated.

FossilOrigin-Name: b3b505a4dd0c679437a4272109f1188175088cd1

12 years agoIn mutex_w32.c, make inclusion of the Windows header file dependent on SQLITE_OS_WIN...
mistachkin [Mon, 12 May 2014 15:37:03 +0000 (15:37 +0000)] 
In mutex_w32.c, make inclusion of the Windows header file dependent on SQLITE_OS_WIN, not SQLITE_MUTEX_W32.

FossilOrigin-Name: 93ffbcc0b1d207950851dbb16a8c101afb949d5f

12 years agoIn the sorter, only use large memory allocations if scratch memory has not
drh [Mon, 12 May 2014 15:30:00 +0000 (15:30 +0000)] 
In the sorter, only use large memory allocations if scratch memory has not
been configured.  Add #ifdefs to disable unused code when
SQLITE_MAX_WORKER_THREADS is zero.  Other sorter changes in support
of testability.

FossilOrigin-Name: d7e2b0d9cb099eda3341bc934bedff9facfe88bd

12 years agoMerge updates from trunk. Emit the AppliesTo and DependsOn SDK manifest attributes... vsixWinPhone81
mistachkin [Sat, 10 May 2014 17:33:11 +0000 (17:33 +0000)] 
Merge updates from trunk.  Emit the AppliesTo and DependsOn SDK manifest attributes when building the VSIX for Windows Phone 8.1.

FossilOrigin-Name: f6237a5f190bd5693ceed0ca1f048c3ec2a4da67

12 years agoWhen using Visual Studio 2013, add the appropriate MaxPlatformVersion attribute to...
mistachkin [Sat, 10 May 2014 17:28:45 +0000 (17:28 +0000)] 
When using Visual Studio 2013, add the appropriate MaxPlatformVersion attribute to the VSIX SDK manifest.

FossilOrigin-Name: 0a4f59676bd0ab33b2c86c9a35a2ebbdbaf09ee7

12 years agoFurther MSVC makefile changes to support Windows Phone 8.1.
mistachkin [Fri, 9 May 2014 23:31:55 +0000 (23:31 +0000)] 
Further MSVC makefile changes to support Windows Phone 8.1.

FossilOrigin-Name: a9c81815e1b7a9c05da61f75edac45cb1a954135

12 years agoMerge updates from trunk.
mistachkin [Fri, 9 May 2014 20:54:07 +0000 (20:54 +0000)] 
Merge updates from trunk.

FossilOrigin-Name: f4fea7bb8a4b118bdceff400a6c49c6291c0d58e

12 years agoWhen cross-compiling with the MSVC makefile, make sure the correct library path is...
mistachkin [Fri, 9 May 2014 20:51:17 +0000 (20:51 +0000)] 
When cross-compiling with the MSVC makefile, make sure the correct library path is used.  Also, keep track of the required compilation options separately.

FossilOrigin-Name: c3dce2e7390eec3a337be1b99f80ad5f721cc647

12 years agoMerge the latest trunk changes into the threads branch.
dan [Fri, 9 May 2014 15:00:32 +0000 (15:00 +0000)] 
Merge the latest trunk changes into the threads branch.

FossilOrigin-Name: 9ac8f1e7115bc50663235adedeb0d3e1234c5740

12 years agoAdd new static mutex SQLITE_MUTEX_STATIC_APP3.
dan [Fri, 9 May 2014 11:15:57 +0000 (11:15 +0000)] 
Add new static mutex SQLITE_MUTEX_STATIC_APP3.

FossilOrigin-Name: ee0ab09c80a648e9202757fc04122952375e7c8c

12 years agoFix static variable declaration issue on Windows.
mistachkin [Thu, 8 May 2014 22:01:08 +0000 (22:01 +0000)] 
Fix static variable declaration issue on Windows.

FossilOrigin-Name: a41d29691307067523c8637b486941c5f7c33775

12 years agoInclude sqlite3rtree.h in the tsrc/ pile of source files during
drh [Wed, 7 May 2014 21:16:56 +0000 (21:16 +0000)] 
Include sqlite3rtree.h in the tsrc/ pile of source files during
target_source in the main.mk makefile.

FossilOrigin-Name: 116bed5af664899a73b46dca528ac0c021fc50c3

12 years agoRemove a superfluous variable initialization.
drh [Wed, 7 May 2014 20:33:17 +0000 (20:33 +0000)] 
Remove a superfluous variable initialization.

FossilOrigin-Name: 68766f837491cb89c2103f2627eb9e23ab326a68

12 years agoA better fix for the group_concat() problem.
drh [Wed, 7 May 2014 20:24:00 +0000 (20:24 +0000)] 
A better fix for the group_concat() problem.

FossilOrigin-Name: 1c086deebd0eb442918972e4b9185a5a0db3b8c3

12 years agoFix the way parenthesis in MATCH expressions are handled by FTS if the tokenizer...
dan [Wed, 7 May 2014 19:59:36 +0000 (19:59 +0000)] 
Fix the way parenthesis in MATCH expressions are handled by FTS if the tokenizer considers them to be token characters.

FossilOrigin-Name: e21bf7a2ade6373e94ea403c665f78e1ad22143f

12 years agoMake sure the group_concat() function returns an empty string, not a NULL,
drh [Wed, 7 May 2014 18:23:04 +0000 (18:23 +0000)] 
Make sure the group_concat() function returns an empty string, not a NULL,
if it has at least one input row. Fix for ticket [55746f9e65f8587].

FossilOrigin-Name: d01cedaa73d8f9e5502502a1068a9509d1de295c

12 years agoEnsure that the sqlite3StrAccumAppend() routine is never called with a NULL tkt-55746f9e
drh [Wed, 7 May 2014 18:21:56 +0000 (18:21 +0000)] 
Ensure that the sqlite3StrAccumAppend() routine is never called with a NULL
second argument.  Doing so is harmless when N==0, but it causes an assert()
to fail that was placed to quiet static analyzers.

FossilOrigin-Name: f03fbf3700d9d4a654e3aa2e5caa810a8416bed9

12 years agoMake sure the group_concat() function returns an empty string, not a NULL,
drh [Wed, 7 May 2014 17:19:31 +0000 (17:19 +0000)] 
Make sure the group_concat() function returns an empty string, not a NULL,
if it has at least one input row.  Fix for ticket [55746f9e65f8587].

FossilOrigin-Name: 0deac8737545a020d344be96fff16660a7977ab8

12 years agoAdd the SQLITE_IOCAP_IMMUTABLE bit as a possible return value from
drh [Wed, 7 May 2014 15:46:04 +0000 (15:46 +0000)] 
Add the SQLITE_IOCAP_IMMUTABLE bit as a possible return value from
the xDeviceCharacteristics method in the VFS.  Add the "nolock" and
"immutable" query parameters to URI filenames.

FossilOrigin-Name: 1a0d7d3d9dd54b783e3a805961287dd01f94770c

12 years agoFix nolock and immutable so that they work even if READONLY is requested. win32-none
drh [Wed, 7 May 2014 15:32:03 +0000 (15:32 +0000)] 
Fix nolock and immutable so that they work even if READONLY is requested.

FossilOrigin-Name: e193aced2942e7405d0f45f90d4954b5663b4ba5

12 years agoAdd test cases and documentation for the nolock and immutable query
drh [Wed, 7 May 2014 15:09:24 +0000 (15:09 +0000)] 
Add test cases and documentation for the nolock and immutable query
parameters.

FossilOrigin-Name: 19d56cbaca222b32e2e354063149cccd89441d73

12 years agoMerge updates from trunk.
mistachkin [Tue, 6 May 2014 21:37:52 +0000 (21:37 +0000)] 
Merge updates from trunk.

FossilOrigin-Name: 69698ae90c415cb32d2c144725853483da65f0ff

12 years agoUpdate the template VSIX package file as well.
mistachkin [Tue, 6 May 2014 21:37:10 +0000 (21:37 +0000)] 
Update the template VSIX package file as well.

FossilOrigin-Name: 99d96765cc378fde7b285f4577ea2b5d130d9a61

12 years agoMerge updates from trunk.
mistachkin [Tue, 6 May 2014 21:30:25 +0000 (21:30 +0000)] 
Merge updates from trunk.

FossilOrigin-Name: 7579c44ac1865133c37b16f2acc074d1eed4fdfd

12 years agoEnhance the VSIX package creation tool to better support Visual Studio 2013.
mistachkin [Tue, 6 May 2014 21:26:34 +0000 (21:26 +0000)] 
Enhance the VSIX package creation tool to better support Visual Studio 2013.

FossilOrigin-Name: c1fb04f61eb74d80d1b7607ae6904fe2e1717988

12 years agoAdd a little extra variety to the tests in sort4.test.
dan [Tue, 6 May 2014 16:21:30 +0000 (16:21 +0000)] 
Add a little extra variety to the tests in sort4.test.

FossilOrigin-Name: 7de6aee6a5cb5c7f89dced89f2ebf38f8be7a4fa

12 years agoRe-implement the core of the multi-threaded sorter tests in sort4.test using C. Run...
dan [Tue, 6 May 2014 15:38:07 +0000 (15:38 +0000)] 
Re-implement the core of the multi-threaded sorter tests in sort4.test using C. Run each test in sort4.test ten times, or repeat all tests for 300 seconds as part of the "multithread" permutation test.

FossilOrigin-Name: 208b2b04d4d282bec4424ea7160a123ba549d118

12 years agoRefactor VSIX package creation tool to better support Visual Studio 2013.
mistachkin [Tue, 6 May 2014 00:09:46 +0000 (00:09 +0000)] 
Refactor VSIX package creation tool to better support Visual Studio 2013.

FossilOrigin-Name: 8be166af239cbdaff3937c4003a6dc6e8a96e53a

12 years agoMerge updates from trunk.
mistachkin [Mon, 5 May 2014 22:50:19 +0000 (22:50 +0000)] 
Merge updates from trunk.

FossilOrigin-Name: 668ed76ac6cfd5810aea7319c752d77fafaab319

12 years agoWhen building for Windows 8.0 using Visual Studio 2013, make sure the cross-compilati...
mistachkin [Mon, 5 May 2014 22:43:17 +0000 (22:43 +0000)] 
When building for Windows 8.0 using Visual Studio 2013, make sure the cross-compilation native library path is set correctly.

FossilOrigin-Name: c1ab9092e29bc9d172c1f1a3becbcc83b79f2080

12 years agoMore modularization work on the MSVC batch build tool.
mistachkin [Mon, 5 May 2014 21:08:47 +0000 (21:08 +0000)] 
More modularization work on the MSVC batch build tool.

FossilOrigin-Name: 9a06773acc181e981f61f476a8e56417b98beba9

12 years agoMerge updates from trunk.
mistachkin [Mon, 5 May 2014 20:35:44 +0000 (20:35 +0000)] 
Merge updates from trunk.

FossilOrigin-Name: eaa8fc810fcff8171b6c5cff8c661a6faf0e023b

12 years agoCreate new header file "os_setup.h" used to detect the operating system
drh [Mon, 5 May 2014 20:32:15 +0000 (20:32 +0000)] 
Create new header file "os_setup.h" used to detect the operating system
at compile-time, and "os_win.h" that contains windows-specific header in
formation.

FossilOrigin-Name: bd92e0f80c1158d810b0d47e38f2fe06ff24bb8c

12 years agoWork on cleaning up the MSVC batch build tool integration with Visual Studio 2013.
mistachkin [Mon, 5 May 2014 20:24:34 +0000 (20:24 +0000)] 
Work on cleaning up the MSVC batch build tool integration with Visual Studio 2013.

FossilOrigin-Name: b5a72dfd59fba6a9938ac1afdec06a2e6809fd2d

12 years agoAttempt to fix the build on beagleboard. winHdr
drh [Mon, 5 May 2014 20:21:52 +0000 (20:21 +0000)] 
Attempt to fix the build on beagleboard.

FossilOrigin-Name: 3ac75725a66730566105ad184a988a8f80f51055

12 years agoAdd test file sort4.test, containing brute force tests for the multi-theaded sorter.
dan [Mon, 5 May 2014 20:03:50 +0000 (20:03 +0000)] 
Add test file sort4.test, containing brute force tests for the multi-theaded sorter.

FossilOrigin-Name: 9cc364c42cc64ab7b55b5c55e303fb63a456cf00

12 years agoCentralize and reform use of the Win32 related include files.
mistachkin [Mon, 5 May 2014 18:24:47 +0000 (18:24 +0000)] 
Centralize and reform use of the Win32 related include files.

FossilOrigin-Name: 857f2baf9b722e4eb1ac0d50fe03e32d5176185b

12 years agoMerge updates from trunk.
mistachkin [Mon, 5 May 2014 17:49:16 +0000 (17:49 +0000)] 
Merge updates from trunk.

FossilOrigin-Name: 6f07f20e41446212a86989a5e6ce7f12998a3ae3

12 years agoMerge updates from trunk.
mistachkin [Mon, 5 May 2014 17:45:44 +0000 (17:45 +0000)] 
Merge updates from trunk.

FossilOrigin-Name: a3cfd81339267c87db511cedf35ec209ee1f1a72

12 years agoFix several header file comments. No changes to code.
mistachkin [Mon, 5 May 2014 17:43:28 +0000 (17:43 +0000)] 
Fix several header file comments.  No changes to code.

FossilOrigin-Name: dd6eb5d1eb4d50023a008fac116497ede29600c1

12 years agoFix a race condition in the sorter code.
dan [Mon, 5 May 2014 15:58:40 +0000 (15:58 +0000)] 
Fix a race condition in the sorter code.

FossilOrigin-Name: 2d2edfe58db101d42a96772b856e6e55b401aab6

12 years agoAdd tests so that the "coverage-sorter" test permutation covers all branches in vdbes...
dan [Mon, 5 May 2014 09:08:54 +0000 (09:08 +0000)] 
Add tests so that the "coverage-sorter" test permutation covers all branches in vdbesort.c. Fix a few minor problems in the same file.

FossilOrigin-Name: bde28b702dabd02269e333535cc41481351c5efc

12 years agoAdd an extra fault-injection test to sortfault.test. Remove an unreachable branch...
dan [Sat, 3 May 2014 20:43:13 +0000 (20:43 +0000)] 
Add an extra fault-injection test to sortfault.test. Remove an unreachable branch from vdbesort.c.

FossilOrigin-Name: a33a366ba8a0da81ddd895d552a348441ef8529a

12 years agoFix a race condition in the sorter.
dan [Sat, 3 May 2014 19:33:00 +0000 (19:33 +0000)] 
Fix a race condition in the sorter.

FossilOrigin-Name: 32ccf3ae18531682dfd039fa8df6ad9a907ac455

12 years agoFix a problem in the sorter causing it to return spurious SQLITE_NOMEM errors when...
dan [Sat, 3 May 2014 14:28:14 +0000 (14:28 +0000)] 
Fix a problem in the sorter causing it to return spurious SQLITE_NOMEM errors when configured to use memsys3 or memsys5.

FossilOrigin-Name: 3a66c4e1bf311d38668dfcdcd77867feff6db7bd

12 years agoGet SQLITE_MUTEX_STATIC_APP1 and _APP2 working for the debugMutex
drh [Sat, 3 May 2014 13:53:37 +0000 (13:53 +0000)] 
Get SQLITE_MUTEX_STATIC_APP1 and _APP2 working for the debugMutex
implementation.

FossilOrigin-Name: f49ba1c926c63ee1c4609930138389fca182c845

12 years agoAdd two new static mutexes, SQLITE_MUTEX_STATIC_APP1 and _APP2, for use by
drh [Sat, 3 May 2014 12:00:01 +0000 (12:00 +0000)] 
Add two new static mutexes, SQLITE_MUTEX_STATIC_APP1 and _APP2, for use by
the application program.  First intended use is in test programs for the
memory allocation logic where one does not want to allocating a _FAST
or _RECURSIVE mutex since that would involve using the memory allocation
system under test.

FossilOrigin-Name: 13686035dd1cf67ad9c6d282ab13c3259e7273d1

12 years agoAdd the SQLITE_DEFAULT_WORKER_THREADS compile-time option.
drh [Sat, 3 May 2014 11:22:09 +0000 (11:22 +0000)] 
Add the SQLITE_DEFAULT_WORKER_THREADS compile-time option.
Fix a NULL-pointer dereference that can occur following OOM.

FossilOrigin-Name: e0dea89b3e9f295f80210fcca007681bf1b08692

12 years agoEnhance the Win32 VFS I/O retry logic.
mistachkin [Fri, 2 May 2014 22:39:54 +0000 (22:39 +0000)] 
Enhance the Win32 VFS I/O retry logic.

FossilOrigin-Name: 4760504396bcf44528eb8de9ed7aa5d9659c54b6

12 years agoMerge updates from trunk. winIoRetry
mistachkin [Fri, 2 May 2014 21:42:31 +0000 (21:42 +0000)] 
Merge updates from trunk.

FossilOrigin-Name: 598a3875ce98015e9a38db54bd0cb6290424c3d8

12 years agoMerge updates from trunk.
mistachkin [Fri, 2 May 2014 21:38:02 +0000 (21:38 +0000)] 
Merge updates from trunk.

FossilOrigin-Name: c4d1d8a0db48f523d1624f2468261c171152c0f7

12 years agoFix typo in Windows makefile. Make sure the WaitForSingleObjectEx system call is...
mistachkin [Fri, 2 May 2014 19:12:37 +0000 (19:12 +0000)] 
Fix typo in Windows makefile.  Make sure the WaitForSingleObjectEx system call is always available.

FossilOrigin-Name: d7ed529fa2aa5cb13edaabca2acaad06dffef569

12 years agoDo not run the vdbeRecordCompareDebug() assert if pKeyInfo->db is NULL since
drh [Fri, 2 May 2014 18:46:52 +0000 (18:46 +0000)] 
Do not run the vdbeRecordCompareDebug() assert if pKeyInfo->db is NULL since
in that case there would be no way to check for a memory allocation failure.

FossilOrigin-Name: 63ed2d6acb82be8a74dbf6a61388be6da6113985

12 years agoMerge orderby-planning with this branch.
dan [Fri, 2 May 2014 18:05:38 +0000 (18:05 +0000)] 
Merge orderby-planning with this branch.

FossilOrigin-Name: d9549de31741239ece060e448b592ce8fc5b8042

12 years agoSimplify assert() statements used to verify correct operation of
drh [Fri, 2 May 2014 17:33:16 +0000 (17:33 +0000)] 
Simplify assert() statements used to verify correct operation of
record comparison routines.

FossilOrigin-Name: 3300d62dcbe74842cf86ca436959fe4e77a89f84

12 years agoFix some broken asserts in btree.c and vdbeaux.c that may fail following an OOM error.
dan [Fri, 2 May 2014 17:12:41 +0000 (17:12 +0000)] 
Fix some broken asserts in btree.c and vdbeaux.c that may fail following an OOM error.

FossilOrigin-Name: e15f47064bef431c0afd8bf93eb4e160c23ad562

12 years agoFailure to extend a temp file for use with mmap() in vdbesort.c is benign.
drh [Fri, 2 May 2014 16:22:55 +0000 (16:22 +0000)] 
Failure to extend a temp file for use with mmap() in vdbesort.c is benign.

FossilOrigin-Name: d4d396387d373bd1e82eda2c7c2e7ca35ec099c4

12 years agoRemove a faulty assert() from vdbesort.c.
dan [Fri, 2 May 2014 16:03:57 +0000 (16:03 +0000)] 
Remove a faulty assert() from vdbesort.c.

FossilOrigin-Name: d95d68aa1d14b750888d50068380cc107f9070df

12 years agoFix a faulty assert() statement.
drh [Fri, 2 May 2014 15:25:24 +0000 (15:25 +0000)] 
Fix a faulty assert() statement.

FossilOrigin-Name: 9196ce407379ca3b151b601b98848771e5cb4e8f

12 years agoFix a broken test case in fuzz.test.
dan [Fri, 2 May 2014 14:54:56 +0000 (14:54 +0000)] 
Fix a broken test case in fuzz.test.

FossilOrigin-Name: faa469355eabb2c407f24638b090725448aac37f

12 years agoMerge latest trunk enhancements and fixes into the orderby-planning branch.
drh [Fri, 2 May 2014 13:09:06 +0000 (13:09 +0000)] 
Merge latest trunk enhancements and fixes into the orderby-planning branch.

FossilOrigin-Name: 84862d3a095629d20c8e7b8a16f4dc26cd41ab6d

12 years agoAdd a comment explaining why WhereLoop cost adjustments are omitted for
drh [Fri, 2 May 2014 00:09:40 +0000 (00:09 +0000)] 
Add a comment explaining why WhereLoop cost adjustments are omitted for
skip-scan loops.

FossilOrigin-Name: 3bc43594aaeee9225c0590677fcce480bedcb37b

12 years agoFix an obscure problem to do with temp register allocation that could occur if more...
dan [Thu, 1 May 2014 20:26:48 +0000 (20:26 +0000)] 
Fix an obscure problem to do with temp register allocation that could occur if more than one simple SELECT within a compound SELECT uses a partial sort.

FossilOrigin-Name: 427409ae106cdab7892a6b50fe30c5f52de5addc

12 years agoAdd #ifdefs for test coverage. Add a testcase().
drh [Thu, 1 May 2014 20:24:21 +0000 (20:24 +0000)] 
Add #ifdefs for test coverage.  Add a testcase().

FossilOrigin-Name: be2702ce35c713b33c9b7689643b45fb0de6af2a

12 years agoUpdate a test case in wal2.test that explicitly corrupts a checksum in the wal file...
dan [Thu, 1 May 2014 10:19:16 +0000 (10:19 +0000)] 
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

12 years agoTake out the special handling of nolock=true in os_win.c and add it to
drh [Thu, 1 May 2014 01:49:22 +0000 (01:49 +0000)] 
Take out the special handling of nolock=true in os_win.c and add it to
pager.c, so that it works for all VFSes.  Add the pPager->noLock boolean
for clarity.

FossilOrigin-Name: 725c1c14be331bce9bf074960dbfa7b6d4c1ba87

12 years agoAvoid unnecessary xUnlock operations on temp file.
drh [Thu, 1 May 2014 01:20:05 +0000 (01:20 +0000)] 
Avoid unnecessary xUnlock operations on temp file.

FossilOrigin-Name: 1829c38c3233c8cb194fae6d560d35a8916b1348

12 years agoAdd the immutable=TRUE query parameter and SQLITE_IOCAP_IMMUTABLE, either
drh [Thu, 1 May 2014 01:13:08 +0000 (01:13 +0000)] 
Add the immutable=TRUE query parameter and SQLITE_IOCAP_IMMUTABLE, either
of which prevents locking of the database and omits tests for existance
of journal files.

FossilOrigin-Name: 71f152c85d79ebd9ca48bc9c4c71fc4debaf2437

12 years agoMerge in all recent changes and enhancements from trunk.
drh [Wed, 30 Apr 2014 20:32:41 +0000 (20:32 +0000)] 
Merge in all recent changes and enhancements from trunk.

FossilOrigin-Name: 84243f844417f888ab731841f7dbf95749f6e034

12 years agoFix a problem in calculating the costs of "OR" scans.
dan [Wed, 30 Apr 2014 18:11:55 +0000 (18:11 +0000)] 
Fix a problem in calculating the costs of "OR" scans.

FossilOrigin-Name: 9bbca48b42e4fe16f2188e18dc736da30a96435c

12 years agoModify the way the costs of various query plans are estimated. If the user supplies...
dan [Wed, 30 Apr 2014 15:22:25 +0000 (15:22 +0000)] 
Modify the way the costs of various query plans are estimated. If the user supplies a likelihood() value (or equivalent) on an indexed WHERE constraint, use it to estimate the number of index rows visited.

FossilOrigin-Name: 90e36676476e8db00658772e6c938242f766d306

12 years agoAdd text to the header comment of whereLoopAddBtree() describing how the costs of... experimental-costs
dan [Wed, 30 Apr 2014 15:00:16 +0000 (15:00 +0000)] 
Add text to the header comment of whereLoopAddBtree() describing how the costs of various b-tree loops are estimated.

FossilOrigin-Name: 05e6e16cb28c9ffb4596bd2ef81f687c5403ecbb

12 years agoUpdate a couple of test cases to account for the fact that this branch prefers an...
dan [Wed, 30 Apr 2014 14:53:21 +0000 (14:53 +0000)] 
Update a couple of test cases to account for the fact that this branch prefers an index scan and partial sort over a full-table scan and full external sort.

FossilOrigin-Name: 9b975bf33cd8fc28c64183a9642bf9fb436a4746

12 years agoFix a couple of out-of-date comments in where.c.
dan [Wed, 30 Apr 2014 14:47:01 +0000 (14:47 +0000)] 
Fix a couple of out-of-date comments in where.c.

FossilOrigin-Name: eefeda32d54efbbdf7d20b719299eda48b891fae

12 years agoImproved rendering of LogEst values corresponding to real values near 0.0
drh [Wed, 30 Apr 2014 14:22:38 +0000 (14:22 +0000)] 
Improved rendering of LogEst values corresponding to real values near 0.0
in the tool/logest.c utility program.

FossilOrigin-Name: 32910c8c595858245bb7ecfe3aa0f90eeae641af

12 years agoFix long-standing typos in comments.
drh [Wed, 30 Apr 2014 13:19:09 +0000 (13:19 +0000)] 
Fix long-standing typos in comments.

FossilOrigin-Name: b9f91317c34d07769a95dc2f905a6ccabceb64a3

12 years agoTest that the default values used when sqlite_stat1 data is not available are calcula...
dan [Tue, 29 Apr 2014 19:01:57 +0000 (19:01 +0000)] 
Test that the default values used when sqlite_stat1 data is not available are calculated correctly. Fixes for the same.

FossilOrigin-Name: e2d42f909de85a0586389f2dc0e654f7af2e351a

12 years agoMerge trunk changes into this branch.
dan [Tue, 29 Apr 2014 16:46:24 +0000 (16:46 +0000)] 
Merge trunk changes into this branch.

FossilOrigin-Name: d74299f037f3a6a4b3bce8b4d1c76c407c1f3b3e

12 years agoIgnore likelihood() values on indexed IPK lookups.
dan [Tue, 29 Apr 2014 16:10:22 +0000 (16:10 +0000)] 
Ignore likelihood() values on indexed IPK lookups.

FossilOrigin-Name: 5bb7757a7b32a74482d3e93e9c9eea02273fe981

12 years agoFix a test case so that it updates sqlite_stat1 consistently.
dan [Tue, 29 Apr 2014 12:01:35 +0000 (12:01 +0000)] 
Fix a test case so that it updates sqlite_stat1 consistently.

FossilOrigin-Name: 2dc5a0b55567f13f0528ed17242e680cde2f2a29

12 years agoDo not reduce the number of rows scanned at all for "IS NOT NULL" constraints. Fix...
dan [Mon, 28 Apr 2014 20:11:20 +0000 (20:11 +0000)] 
Do not reduce the number of rows scanned at all for "IS NOT NULL" constraints. Fix a bug in calculating the number of rows visited by scans of partial indicies.

FossilOrigin-Name: a8ae93f0cffa116df0ba34d46a53f49d42dace41

12 years agoThe trunk assumes that an open range constraint on an indexed term (col>?) term match...
dan [Mon, 28 Apr 2014 19:34:06 +0000 (19:34 +0000)] 
The trunk assumes that an open range constraint on an indexed term (col>?) term matches 1/4 of the indexed rows, and that a closed constraint (col BETWEEN ? AND ?) matches 1/64. Change this branch to do the same.

FossilOrigin-Name: 4047ac75e2a8f0b330255501c42e4f04e5ab500d