]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
10 years agoExperimental changes that permit read operations to continue after a read-after-rollback
drh [Tue, 11 Nov 2014 01:33:57 +0000 (01:33 +0000)] 
Experimental changes that permit read operations to continue after a
ROLLBACK, as long as the schema is unchanged.

FossilOrigin-Name: fa6e6a9ae276cad60e9a4abc1bc23cf2809ea786

10 years agoNew test cases for deleting content out from under a SELECT statement.
drh [Mon, 10 Nov 2014 19:16:59 +0000 (19:16 +0000)] 
New test cases for deleting content out from under a SELECT statement.

FossilOrigin-Name: 8289c3e9b47f7c2a606a88839f6bf615f8904ac2

10 years agoAdd test file e_blobwrite.test, containing tests for the sqlite3_blob_write() interface.
dan [Mon, 10 Nov 2014 17:53:03 +0000 (17:53 +0000)] 
Add test file e_blobwrite.test, containing tests for the sqlite3_blob_write() interface.

FossilOrigin-Name: 1df77e5f1bd82de4dc92fe28359c3e56ab3f9ed4

10 years agoAdd the eval() SQL function extension in ext/misc/eval.c.
drh [Mon, 10 Nov 2014 16:49:56 +0000 (16:49 +0000)] 
Add the eval() SQL function extension in ext/misc/eval.c.

FossilOrigin-Name: 27cf665b957f2c0ced403e3032099e80c295598f

10 years agoShorten over-length source code lines in shell.c.
drh [Mon, 10 Nov 2014 14:42:28 +0000 (14:42 +0000)] 
Shorten over-length source code lines in shell.c.

FossilOrigin-Name: 7f3819f6422badd344c1264b0cd2f2c7afe077df

10 years agoAdd new test file e_blobopen.test, containing tests for sqlite3_blob_open().
dan [Fri, 7 Nov 2014 14:41:11 +0000 (14:41 +0000)] 
Add new test file e_blobopen.test, containing tests for sqlite3_blob_open().

FossilOrigin-Name: ecbccd0e594d22b3ae7fabc8037951dc49570bc3

10 years agoFix another harmless comment typo.
drh [Fri, 7 Nov 2014 14:37:32 +0000 (14:37 +0000)] 
Fix another harmless comment typo.

FossilOrigin-Name: b45bc80bb16f07192d84fd14433bb724a84d4146

10 years agoIn the ".scanstats on" output from the shell, round the estRows value to
drh [Fri, 7 Nov 2014 13:52:44 +0000 (13:52 +0000)] 
In the ".scanstats on" output from the shell, round the estRows value to
the nearest integer, rather than rounding toward zero.

FossilOrigin-Name: 5700508535c35ac6b158b527e1d47e529e8e28ab

10 years agoFix harmless typos in comments.
drh [Fri, 7 Nov 2014 13:24:29 +0000 (13:24 +0000)] 
Fix harmless typos in comments.

FossilOrigin-Name: 94c564da4c2cf5dffe58fdf7a180e9ba4cc3de69

10 years agoFix typo in sqlite3.h reported on the mailing list.
drh [Fri, 7 Nov 2014 11:39:16 +0000 (11:39 +0000)] 
Fix typo in sqlite3.h reported on the mailing list.

FossilOrigin-Name: 402703212a8488f8b571ce170b3b6c7374bd7daa

10 years agoUpdate documentation on sqlite3_config() and add corresponding evidence marks.
drh [Fri, 7 Nov 2014 01:43:56 +0000 (01:43 +0000)] 
Update documentation on sqlite3_config() and add corresponding evidence marks.

FossilOrigin-Name: 360c8ca11c3315c8e08c7c52ff5468e3f723e562

10 years agoAdded SQLITE_SCANSTAT_SELECTID. Change the value returned by
drh [Thu, 6 Nov 2014 14:43:53 +0000 (14:43 +0000)] 
Added SQLITE_SCANSTAT_SELECTID.  Change the value returned by
SQLITE_SCANSTAT_EST from sqlite3_int64 to double.  Enhanced the formatting
and display of scan statistics using the ".scanstats on" command in the
shell.

FossilOrigin-Name: 20c7614addb8494cd7f40263a50fa6f428cce1c7

10 years agoFurther improvements to the ".scanstats on" display in the shell. Be sure scanstatus
drh [Thu, 6 Nov 2014 12:46:16 +0000 (12:46 +0000)] 
Further improvements to the ".scanstats on" display in the shell.  Be sure
to show the results of all subqueries even if there are gaps in the
SELECTID values.  Add ".scanstats" to the ".help" output.

FossilOrigin-Name: ee922682bb7235dbcd23a22fcfdfa188f6d3228a

10 years agoOn the ".scanstats on" output in the shell, initialize the estimated count for
drh [Thu, 6 Nov 2014 12:17:24 +0000 (12:17 +0000)] 
On the ".scanstats on" output in the shell, initialize the estimated count for
the first loop of each subquery to the actual loop count.

FossilOrigin-Name: d1c51c8455d5ce972a77720c2d56228646ced27c

10 years agoChanges the formatting of ".scanstats on" in the shell so that the stats for
drh [Thu, 6 Nov 2014 12:08:21 +0000 (12:08 +0000)] 
Changes the formatting of ".scanstats on" in the shell so that the stats for
subqueries are grouped together and occur after the main query.

FossilOrigin-Name: eacbbd8849db9b023eff15ef1cb42ec941299433

10 years agoAdd the SQLITE_SCANSTAT_SELECTID metric. Use it to improve the
drh [Thu, 6 Nov 2014 04:42:20 +0000 (04:42 +0000)] 
Add the SQLITE_SCANSTAT_SELECTID metric.  Use it to improve the
".stmtscan on" output in the shell.

FossilOrigin-Name: 64ad5761a841f71530d41565b9fbe9d19c2d6aff

10 years agoChange the SQLITE_SCANSTAT_EST parameter so that it returns a double for
drh [Thu, 6 Nov 2014 03:55:10 +0000 (03:55 +0000)] 
Change the SQLITE_SCANSTAT_EST parameter so that it returns a double for
the estimated number of output rows per loop, rather than a 64-bit integer.
Revise the output format for the ".scanstats on" in the shell to make use
of this new capability.

FossilOrigin-Name: f9684000665ae7ef6f89c3773612b8286b8f545a

10 years agoFixes to the Windows VFS to allow memory mapped files to work without WAL support.
drh [Wed, 5 Nov 2014 21:34:56 +0000 (21:34 +0000)] 
Fixes to the Windows VFS to allow memory mapped files to work without WAL support.

FossilOrigin-Name: 272fddc14cc322655eeba670bc0f9fc30e5a804c

10 years agoFix harmless compiler warnings in the new balance_nonroot() routine.
drh [Wed, 5 Nov 2014 21:21:08 +0000 (21:21 +0000)] 
Fix harmless compiler warnings in the new balance_nonroot() routine.

FossilOrigin-Name: 83a1e5db926b3a6d40f4a5cf9a8e6852b9bac9ac

10 years agoChange the query planner to do a better job of estimating the number rows
drh [Wed, 5 Nov 2014 19:26:12 +0000 (19:26 +0000)] 
Change the query planner to do a better job of estimating the number rows
selected by a BETWEEN operator using STAT4 when both upper and lower bounds
are contained within the same sample.

FossilOrigin-Name: 2d36be5d9a1cdd4fd2d54fc4eeece32a81cbacc1

10 years agoMake sure that NULL results from OP_Column are fully and completely NULL
drh [Wed, 5 Nov 2014 15:57:39 +0000 (15:57 +0000)] 
Make sure that NULL results from OP_Column are fully and completely NULL
and do not have the MEM_Ephem bit set.  Fix for ticket [094d39a4c95ee4].

FossilOrigin-Name: 42705fd7d892c4fdfb95fbbb468c99569beece25

10 years agoAdd a test case to check that the previous commit is effective.
dan [Wed, 5 Nov 2014 14:19:05 +0000 (14:19 +0000)] 
Add a test case to check that the previous commit is effective.

FossilOrigin-Name: 948d6e5d07bc14b6de32ec2144c716a5532f894c

10 years agoEnhance whereLoopCheaperProperSubset(X,Y) so that it does not report true
drh [Wed, 5 Nov 2014 13:13:13 +0000 (13:13 +0000)] 
Enhance whereLoopCheaperProperSubset(X,Y) so that it does not report true
if X uses skip-scan less than Y, since in that case X might
deserve to be cheaper even if it is a proper subset.

FossilOrigin-Name: c106b755369c1f8546e897ecd2ac56fd09d6e885

10 years agoAdd the ".scanstats on" command to the shell tool. Executing this command causes...
dan [Wed, 5 Nov 2014 09:07:28 +0000 (09:07 +0000)] 
Add the ".scanstats on" command to the shell tool. Executing this command causes the shell tool to print values from sqlite3_stmt_scanstatus() after each query is run.

FossilOrigin-Name: 7974c0ed10ffdc960a43fed89845c2bed428958d

10 years agoImproved output formatting for the showstat4 tool.
drh [Tue, 4 Nov 2014 21:38:45 +0000 (21:38 +0000)] 
Improved output formatting for the showstat4 tool.

FossilOrigin-Name: 7df82c46da437bc743576358c25e758280067df8

10 years agoSkip tests that require WAL mode when it is not enabled. winMmapNoWal
mistachkin [Tue, 4 Nov 2014 19:52:15 +0000 (19:52 +0000)] 
Skip tests that require WAL mode when it is not enabled.

FossilOrigin-Name: 6fc4ead26d19b9348bbda34c3053ae1e066abc32

10 years agoFor the Win32 VFS, allow memory mapped files to work when compiled without WAL support.
mistachkin [Tue, 4 Nov 2014 19:37:22 +0000 (19:37 +0000)] 
For the Win32 VFS, allow memory mapped files to work when compiled without WAL support.

FossilOrigin-Name: 1fc7e2f3d34e25e7b59aa8b51d10c1e27ab4a527

10 years agoAdd various requirements evidence marks for sqlite3_config() options.
drh [Tue, 4 Nov 2014 17:23:24 +0000 (17:23 +0000)] 
Add various requirements evidence marks for sqlite3_config() options.

FossilOrigin-Name: d423349d2cd8bc7e04f3d90ca7bab11e1ad86e25

10 years agoChange the definition of SQLITE_CONFIG_SCRATCH so that at most one scratch
drh [Tue, 4 Nov 2014 14:22:27 +0000 (14:22 +0000)] 
Change the definition of SQLITE_CONFIG_SCRATCH so that at most one scratch
buffer is used per thread.  Use the generic heap memory allocator for the
WalIterator object when running a checkpoint.

FossilOrigin-Name: 391c9b85abcb5ba300fb2e116384639310c69ed2

10 years agoImproved documentation and addition of source-code evidence marks for the
drh [Tue, 4 Nov 2014 13:41:32 +0000 (13:41 +0000)] 
Improved documentation and addition of source-code evidence marks for the
sqlite3_config() interface.

FossilOrigin-Name: 681031a436fdd4cce426d6cd43cbae6b83167d26

10 years agoAdd the SQLITE_CONFIG_PCACHE_HDRSZ option for sqlite3_config().
drh [Tue, 4 Nov 2014 12:11:23 +0000 (12:11 +0000)] 
Add the SQLITE_CONFIG_PCACHE_HDRSZ option for sqlite3_config().

FossilOrigin-Name: 6eb03e62a34e8e0964175283587247b0212db604

10 years agoUpdates to the sqlite3_stmt_scanstatus() documentation. No changes to code.
drh [Mon, 3 Nov 2014 18:03:00 +0000 (18:03 +0000)] 
Updates to the sqlite3_stmt_scanstatus() documentation.  No changes to code.

FossilOrigin-Name: d97c324eb1d870c994911c53fbf84205f4e3e7a1

10 years agoAdd the experimental sqlite3_stmt_scanstatus() API. For comparing the number of rows...
dan [Mon, 3 Nov 2014 16:56:43 +0000 (16:56 +0000)] 
Add the experimental sqlite3_stmt_scanstatus() API. For comparing the number of rows actually visited by a loop with the estimate used by the query planner.

FossilOrigin-Name: ab3b0fc5760c6d428dbe1f974726a7d3526640bc

10 years agoFix a typo preventing this from building with SQLITE_ENABLE_STMT_SCANSTATUS defined.
dan [Mon, 3 Nov 2014 16:39:37 +0000 (16:39 +0000)] 
Fix a typo preventing this from building with SQLITE_ENABLE_STMT_SCANSTATUS defined.

FossilOrigin-Name: 4c5714ab3dba19513374c7b1478221a0b90b450c

10 years agoRefactor the interface to make it more easily extensible.
drh [Mon, 3 Nov 2014 16:35:55 +0000 (16:35 +0000)] 
Refactor the interface to make it more easily extensible.

FossilOrigin-Name: 7955342da4a35b57e4ae26690b8d40f7bba20e8f

10 years agoAdd further tests. Fixes so that compilation without ENABLE_STMT_SCANSTATUS works.
dan [Mon, 3 Nov 2014 15:33:17 +0000 (15:33 +0000)] 
Add further tests. Fixes so that compilation without ENABLE_STMT_SCANSTATUS works.

FossilOrigin-Name: a2303c719222f1effb51acc6b37930561148c00c

10 years agoUse exponential buffer size growth in StrAccum, as long as the size does not
drh [Mon, 3 Nov 2014 14:46:29 +0000 (14:46 +0000)] 
Use exponential buffer size growth in StrAccum, as long as the size does not
grow to large, to avoid excess memory allocation resize operations.  Also,
document the fact that setting scratch memory causes SQLite to try to avoid
large memory allocations.

FossilOrigin-Name: a518bc3318232d652349eb29303ff250aee40459

10 years agoWhen enlarging the size of a StrAccum object, use sqlite3DbMallocSize() to
drh [Mon, 3 Nov 2014 13:24:12 +0000 (13:24 +0000)] 
When enlarging the size of a StrAccum object, use sqlite3DbMallocSize() to
record the entire size of the allocation, not just the requested size.

FossilOrigin-Name: 3dda3c937469ce661d1cd0e8d8963a03e698ee39

10 years agoRemove unused variable from struct WhereInfo. Add some explanatory comments to new...
dan [Mon, 3 Nov 2014 11:25:32 +0000 (11:25 +0000)] 
Remove unused variable from struct WhereInfo. Add some explanatory comments to new code.

FossilOrigin-Name: f5313e0c680d9baebefb1cf50ddadedd4418a334

10 years agoMinor performance enhancements to SQLITE_ENABLE_STMT_SCANSTATUS code.
dan [Sat, 1 Nov 2014 21:00:04 +0000 (21:00 +0000)] 
Minor performance enhancements to SQLITE_ENABLE_STMT_SCANSTATUS code.

FossilOrigin-Name: f13d6ba8a72d75838c4aaf85326c1129da027f8b

10 years agoIf SQLITE_ENABLE_STMT_SCANSTATUS is defined, record the number of times each VDBE...
dan [Sat, 1 Nov 2014 20:38:06 +0000 (20:38 +0000)] 
If SQLITE_ENABLE_STMT_SCANSTATUS is defined, record the number of times each VDBE opcode is executed. Derive the values returned by sqlite3_stmt_scanstatus() from these records on demand.

FossilOrigin-Name: 9ea37422a8cc2fce51bb10508e5e90f40fd4b511

10 years agoAdd requirements marks and make minor tweaks to documentation.
drh [Sat, 1 Nov 2014 18:32:18 +0000 (18:32 +0000)] 
Add requirements marks and make minor tweaks to documentation.

FossilOrigin-Name: 49188b2bb53a92b0b0b6aaf8247edeb0c1bcd1f5

10 years agoMinor fixes and documentation improvements for sqlite3_stmt_scanstatus().
dan [Sat, 1 Nov 2014 18:08:04 +0000 (18:08 +0000)] 
Minor fixes and documentation improvements for sqlite3_stmt_scanstatus().

FossilOrigin-Name: 8d8cc9608d30bb65fffcfe488e904411cbbc7f41

10 years agoAdd the experimental sqlite3_stmt_scanstatus() API.
dan [Fri, 31 Oct 2014 20:11:32 +0000 (20:11 +0000)] 
Add the experimental sqlite3_stmt_scanstatus() API.

FossilOrigin-Name: 6a9bab34aeb6a01b612211a28c140de60a3e883c

10 years agoChange the command-line shell man-page to use the ".tr" troff directive
drh [Fri, 31 Oct 2014 14:46:51 +0000 (14:46 +0000)] 
Change the command-line shell man-page to use the ".tr" troff directive
instead of ".cc" for escaping the initial "." characters in the ".help"
output.

FossilOrigin-Name: 67f0d469da28c023200239a1f3d0c6cef9ef0e45

10 years agoSimplify the logic in the cell redistribution loop of balance_nonroot().
drh [Fri, 31 Oct 2014 14:26:36 +0000 (14:26 +0000)] 
Simplify the logic in the cell redistribution loop of balance_nonroot().
Enhance and clarify comments and add assert() statements for additional
verification of correctness.

FossilOrigin-Name: a07078b60007e88adea67bec5f0caf91f707ad78

10 years agoSimplify the math slightly, and reduce by one the number of loop iterations,
drh [Fri, 31 Oct 2014 12:22:00 +0000 (12:22 +0000)] 
Simplify the math slightly, and reduce by one the number of loop iterations,
for the loop in balance_nonroot() that moves cells between pages.

FossilOrigin-Name: 2e838db82e533598b3cb00011c04fc0d5a896895

10 years agoAdd the "varint.c" utility program in the tool directory.
drh [Fri, 31 Oct 2014 10:31:59 +0000 (10:31 +0000)] 
Add the "varint.c" utility program in the tool directory.

FossilOrigin-Name: ea5d56be5fe14934e4dbe9c17d46b058f487a231

10 years agoRemove an unnecessary branch from balance_nonroot().
drh [Fri, 31 Oct 2014 02:51:41 +0000 (02:51 +0000)] 
Remove an unnecessary branch from balance_nonroot().

FossilOrigin-Name: 9fc7c88e3f5221883aa6eafbf8af3be94db0c299

10 years agoIn the balance_nonroot() routine, protect the values in aPgno[] array from
drh [Fri, 31 Oct 2014 00:05:23 +0000 (00:05 +0000)] 
In the balance_nonroot() routine, protect the values in aPgno[] array from
change during the page sort, so that aPgno[] can be used to avoid unnecessary
pointer-map updates for auto_vacuum databases.

FossilOrigin-Name: 69c3924fe834a78d4a8d86833626bf5f68e33a3a

10 years agoImprovements to the wording of some comments. Reinstate an assert() that
drh [Thu, 30 Oct 2014 23:14:56 +0000 (23:14 +0000)] 
Improvements to the wording of some comments.  Reinstate an assert() that
is only true for non-corrupt database files by adding an "|| CORRUPT_DB" term.

FossilOrigin-Name: 67adb44838f98805f86aecca634d9a3b07370b9e

10 years agoTweaks to comments in btree.c. Minor code changes to enhance testability.
drh [Thu, 30 Oct 2014 20:48:44 +0000 (20:48 +0000)] 
Tweaks to comments in btree.c.  Minor code changes to enhance testability.

FossilOrigin-Name: c7d9aa3a1ce63e27ec94295601bc89fecf1e4977

10 years agoFix the %c format character in sqlite3VXPrintf() so that it correctly
drh [Wed, 29 Oct 2014 18:20:18 +0000 (18:20 +0000)] 
Fix the %c format character in sqlite3VXPrintf() so that it correctly
handles precisions larger than 70.

FossilOrigin-Name: 08a27440f19b7fc884464832e6105af1bf008172

10 years agoIn the OP_Column opcode, when extracting a field that is past the end of
drh [Wed, 29 Oct 2014 00:58:38 +0000 (00:58 +0000)] 
In the OP_Column opcode, when extracting a field that is past the end of
a short record (because the row was originally inserted prior to ALTER TABLE
ADD COLUMN) then make sure the output register is fully NULL and does not
contain leftover flags (such as MEM_Ephem) from its previous use.
Fix for ticket [43107840f1c02].

FossilOrigin-Name: 24780f8ddc1683fc62180e6961dc6bfe1168f4df

10 years agoAdd new test file e_totalchanges.test, containing tests of the sqlite3_total_changes...
dan [Tue, 28 Oct 2014 20:49:59 +0000 (20:49 +0000)] 
Add new test file e_totalchanges.test, containing tests of the sqlite3_total_changes() interface.

FossilOrigin-Name: f84af4adcc34d7a4c72027bf5b038a1a45a4c307

10 years agoUpdate the documentation on the sqlite3_randomness() interface to conform
drh [Tue, 28 Oct 2014 20:35:18 +0000 (20:35 +0000)] 
Update the documentation on the sqlite3_randomness() interface to conform
to enhancements associated with the SQLITE_ENABLE_API_ARMOR change.

FossilOrigin-Name: 96e9917c350dfe2069b87860bbb961424ff1105a

10 years agoModify the documentation for sqlite3_changes() to make it more testable. Add tests...
dan [Tue, 28 Oct 2014 18:24:16 +0000 (18:24 +0000)] 
Modify the documentation for sqlite3_changes() to make it more testable. Add tests and minor fixes for the same.

FossilOrigin-Name: 41cdd0c422d61533a94870cb5ad094682956d472

10 years agoFix a crash that could occur if the WHERE clause of an UPDATE statement on a view...
dan [Tue, 28 Oct 2014 16:50:10 +0000 (16:50 +0000)] 
Fix a crash that could occur if the WHERE clause of an UPDATE statement on a view that does not feature a column named "rowid" contains a term such as "rowid=?".

FossilOrigin-Name: 8523670d50004f3112b7871f11c8b8b02aab96ab

10 years agoFix a faulty assert() in the DELETE code generator.
drh [Tue, 28 Oct 2014 16:19:18 +0000 (16:19 +0000)] 
Fix a faulty assert() in the DELETE code generator.

FossilOrigin-Name: 95f8ebdbf87326f23cd38e561ac5632b5367a449

10 years agoTrivial simplification to the automatic index logic.
drh [Tue, 28 Oct 2014 15:58:50 +0000 (15:58 +0000)] 
Trivial simplification to the automatic index logic.

FossilOrigin-Name: 23073a053931de324323f631a6613086786af411

10 years agoBump the version number to 3.8.8
drh [Tue, 28 Oct 2014 12:35:28 +0000 (12:35 +0000)] 
Bump the version number to 3.8.8

FossilOrigin-Name: 1a7e711ed10860c7985e84b97cdfff748d940b9f

10 years agoCorrect the documentation on the maximum size of a scratch allocation.
drh [Tue, 28 Oct 2014 00:56:18 +0000 (00:56 +0000)] 
Correct the documentation on the maximum size of a scratch allocation.

FossilOrigin-Name: 30f86eb3f9ac88f83ed9e23ea6cd1fccf68e0812

10 years agoAdd special handling for static mutexes in sqlite3_mutex_alloc() when automatic calls...
mistachkin [Mon, 27 Oct 2014 22:06:21 +0000 (22:06 +0000)] 
Add special handling for static mutexes in sqlite3_mutex_alloc() when automatic calls to sqlite3_initialize() are enabled.

FossilOrigin-Name: 7857d27caa845e5629d94c2e66587dc89016daca

10 years agoRemove a small amount of unnecessary #ifdeffery from random.c.
drh [Mon, 27 Oct 2014 20:14:02 +0000 (20:14 +0000)] 
Remove a small amount of unnecessary #ifdeffery from random.c.

FossilOrigin-Name: 2b9340c8684bc382391e02813e960b3166f24daa

10 years agoFix compilation issue with MSVC due to a misplaced variable declaration.
mistachkin [Mon, 27 Oct 2014 19:58:29 +0000 (19:58 +0000)] 
Fix compilation issue with MSVC due to a misplaced variable declaration.

FossilOrigin-Name: 9588b345d09daaa49d24d7fb6cab732e64e5474e

10 years agoFix harmless compiler warning in an assert statement.
mistachkin [Mon, 27 Oct 2014 19:42:02 +0000 (19:42 +0000)] 
Fix harmless compiler warning in an assert statement.

FossilOrigin-Name: d33a1ff3aad0bfabf70a98ac338a68f82074e4fe

10 years agoFix a typo in the macro name of an #ifdef
drh [Mon, 27 Oct 2014 19:39:51 +0000 (19:39 +0000)] 
Fix a typo in the macro name of an #ifdef

FossilOrigin-Name: 9646a136e69cf2583965dfc9fac5f056af4cdb62

10 years agoAdd the SQLITE_ENABLE_API_ARMOR compile-time option for extra API parameter
drh [Mon, 27 Oct 2014 18:34:07 +0000 (18:34 +0000)] 
Add the SQLITE_ENABLE_API_ARMOR compile-time option for extra API parameter
validation.  Enhance sqlite3_stricmp(), sqlite3_strnicmp(), and
sqlite3_uri_parameter() for improved NULL parameter handling.

FossilOrigin-Name: ffb9d8144bbc35bf3d929e0e13a663668fff0558

10 years agoFix an unused variable in btree.c:allocateSpace().
drh [Mon, 27 Oct 2014 18:21:01 +0000 (18:21 +0000)] 
Fix an unused variable in btree.c:allocateSpace().

FossilOrigin-Name: 637246165a14c4808b90d0437e4d43fa5fac659e

10 years agoOptimizations aimed at reducing the number of memcpy() operations required by balance...
dan [Mon, 27 Oct 2014 14:26:54 +0000 (14:26 +0000)] 
Optimizations aimed at reducing the number of memcpy() operations required by balance_nonroot().

FossilOrigin-Name: face33bea1ba3a6d57780655fa827226b4d2baa9

10 years agoAdd test file e_wal.test.
dan [Mon, 27 Oct 2014 11:25:28 +0000 (11:25 +0000)] 
Add test file e_wal.test.

FossilOrigin-Name: fc6920b5483eeeb06a474ff399a21afa51dc4859

10 years agoIf a free-slot is found within a page, but using that free-slot would fragment the... defrag-opt
dan [Mon, 27 Oct 2014 08:02:16 +0000 (08:02 +0000)] 
If a free-slot is found within a page, but using that free-slot would fragment the page further and there are already at least 60 fragmented bytes, degragment the page. This matches the behaviour of the trunk.

FossilOrigin-Name: 1f80f8c136ac970dcc7fb2337263dc5922e348c3

10 years agoMerge trunk with this branch.
dan [Mon, 27 Oct 2014 07:01:04 +0000 (07:01 +0000)] 
Merge trunk with this branch.

FossilOrigin-Name: a13df3013bbac4a0d4fce5cef1376c857508c1c5

10 years agoFurther modifications to new code to better handle corrupt databases.
dan [Sat, 25 Oct 2014 20:36:28 +0000 (20:36 +0000)] 
Further modifications to new code to better handle corrupt databases.

FossilOrigin-Name: 1a8cf0a043347772ac54d150d634c32845beee8b

10 years agoIncrease the resolution of the second parameter to the likelihood() SQL
drh [Sat, 25 Oct 2014 13:42:16 +0000 (13:42 +0000)] 
Increase the resolution of the second parameter to the likelihood() SQL
function (the probability value) so that it can handle probabilities
as small as 0.00000001.  Formerly, it ran out of precision at 0.001.

FossilOrigin-Name: 0f08924fe0c52a85a103f67bee9809e0f8f884b0

10 years agoDo not use virtual (and hence redundant) WHERE-clause terms to restrict the
drh [Sat, 25 Oct 2014 12:28:25 +0000 (12:28 +0000)] 
Do not use virtual (and hence redundant) WHERE-clause terms to restrict the
content of a automatic partial index.  Show when an automatic partial index
is used in the EXPLAIN QUERY PLAN output.

FossilOrigin-Name: b9ad601eab1d7298d369267eb697c7fa1bc16985

10 years agoEnsure that the "Any prior cache entry associated with newKey is guaranteed not to...
dan [Fri, 24 Oct 2014 20:57:03 +0000 (20:57 +0000)] 
Ensure that the "Any prior cache entry associated with newKey is guaranteed not to be pinned" guarantee made to xRekey implementations is not violated.

FossilOrigin-Name: ecc3544e712041736af7c7b4f34864a1f2e30ff7

10 years agoEnhance the automatic index logic so that it creates a partial index when
drh [Fri, 24 Oct 2014 19:28:09 +0000 (19:28 +0000)] 
Enhance the automatic index logic so that it creates a partial index when
doing so gives the same answer for less work.

FossilOrigin-Name: d95d0313c447f5baeabdb17284d8606331ab7d49

10 years agoFix some issues in the new code on this branch related to the handling of corrupt...
dan [Fri, 24 Oct 2014 18:43:57 +0000 (18:43 +0000)] 
Fix some issues in the new code on this branch related to the handling of corrupt databases.

FossilOrigin-Name: 19736dd9fbbb7e252c4f8715e2277d48ac41f5bc

10 years agoFix some minor formatting and code organization issues.
dan [Fri, 24 Oct 2014 16:40:49 +0000 (16:40 +0000)] 
Fix some minor formatting and code organization issues.

FossilOrigin-Name: eab8706dc47aa0a44caf73619de858397c3e0b4e

10 years agoHonor a high likelihood() on range constraints.
drh [Fri, 24 Oct 2014 15:26:29 +0000 (15:26 +0000)] 
Honor a high likelihood() on range constraints.

FossilOrigin-Name: 401235edf40fcd665eaf426cf5155ac6855e8537

10 years agoGet the likelihood() functions working on operators like BETWEEN that
drh [Fri, 24 Oct 2014 14:32:21 +0000 (14:32 +0000)] 
Get the likelihood() functions working on operators like BETWEEN that
create virtual terms in the WHERE-clause analysis.

FossilOrigin-Name: 03d0498d0f24bec2383d5d79edf25069effecd59

10 years agoFix two problems. Tests now passing. api-armor
drh [Fri, 24 Oct 2014 12:37:00 +0000 (12:37 +0000)] 
Fix two problems.  Tests now passing.

FossilOrigin-Name: 1c220b806d56e163842e17038c3331f71861bd9c

10 years agoAdd the SQLITE_ENABLE_API_ARMOR compile-time option. This is a work in
drh [Fri, 24 Oct 2014 00:35:58 +0000 (00:35 +0000)] 
Add the SQLITE_ENABLE_API_ARMOR compile-time option.  This is a work in
progress and is not yet completely functional.

FossilOrigin-Name: c297a84bc678f81ffc0aa9139ab73f0ca87c1971

10 years agoImplement sqlite3_create_collation() by invoking
drh [Thu, 23 Oct 2014 01:01:26 +0000 (01:01 +0000)] 
Implement sqlite3_create_collation() by invoking
sqlite3_create_collation_v2() with a NULL destructor argument.  This saves
a little space.

FossilOrigin-Name: 9762ad0639cca2fc1ef0573113fb613ce9e7e83e

10 years agoDisable the use of strchrnul() unless specifically enabled by compile-time
drh [Wed, 22 Oct 2014 20:07:19 +0000 (20:07 +0000)] 
Disable the use of strchrnul() unless specifically enabled by compile-time
options.

FossilOrigin-Name: e580470db77d6da970c755102790e603fb26b3c6

10 years agoChange the 0x800 bit of SQLITE_TESTCTRL_OPTIMIZATIONS so that it disables
drh [Wed, 22 Oct 2014 19:57:16 +0000 (19:57 +0000)] 
Change the 0x800 bit of SQLITE_TESTCTRL_OPTIMIZATIONS so that it disables
the loading of STAT3 and STAT4 content, not just the using of that content.
Change the internal name of that bit to SQLITE_Stat34.

FossilOrigin-Name: ca3b00c44ec52d209642a5ba9ef82e085fac39db

10 years agoMerge latest trunk with this branch.
dan [Wed, 22 Oct 2014 18:42:31 +0000 (18:42 +0000)] 
Merge latest trunk with this branch.

FossilOrigin-Name: 854a54c6c21e800b0cd999023014813f7c50b23f

10 years agoTake steps to avoid misestimating range query costs based on STAT4 data
drh [Wed, 22 Oct 2014 15:27:05 +0000 (15:27 +0000)] 
Take steps to avoid misestimating range query costs based on STAT4 data
due to the roundoff error of converting from integers to LogEst and back
to integers.

FossilOrigin-Name: 3c933bf95f291f7957580d823dce92c981375a5c

10 years agoCall fsync() right after ftruncate() when in journal_mode=TRUNCATE and
drh [Tue, 21 Oct 2014 21:56:06 +0000 (21:56 +0000)] 
Call fsync() right after ftruncate() when in journal_mode=TRUNCATE and
when synchronous=FULL in order to ensure that transactions are durable
across a power loss that happens moments after the commit.  Proposed
fix for [https://bugzilla.mozilla.org/show_bug.cgi?id=1072773].

FossilOrigin-Name: 3e922208b68563489c7766abb9afb4885113e7b8

10 years agoFurther tuning of the cost estimates for skip-scan loops, especially for cases
drh [Tue, 21 Oct 2014 18:16:21 +0000 (18:16 +0000)] 
Further tuning of the cost estimates for skip-scan loops, especially for cases
when skip-scan loops are in competition with regular loops.

FossilOrigin-Name: a27861c28c4791e51d797aa37e9cca806cb58775

10 years agoImprovements to the WHERETRACE debugging logic.
drh [Tue, 21 Oct 2014 16:01:40 +0000 (16:01 +0000)] 
Improvements to the WHERETRACE debugging logic.

FossilOrigin-Name: ec1e942f08548695ff02645b3f3cd6bb2516bc9a

10 years agoIf a skip-scan is a proper subset of some other scan, then adjust the
drh [Tue, 21 Oct 2014 01:05:09 +0000 (01:05 +0000)] 
If a skip-scan is a proper subset of some other scan, then adjust the
cost of the skip-scan upward so that it is more costly than the other scan.
Such a cost imbalance can arise under STAT4 because of difficulties in getting
an accurate estimate for skip-scans.

FossilOrigin-Name: f4b22a2620a5dc48949048c2ecbd226755d4b2c3

10 years agoFix a (probably harmless) but in the CSV output mode of the command-line
drh [Fri, 17 Oct 2014 21:35:05 +0000 (21:35 +0000)] 
Fix a (probably harmless) but in the CSV output mode of the command-line
shell.

FossilOrigin-Name: 19fe4a0a475bd94f491031aea7a183f7c0515cf3

10 years agoVersion 3.8.7 version-3.8.7
drh [Fri, 17 Oct 2014 11:24:17 +0000 (11:24 +0000)] 
Version 3.8.7

FossilOrigin-Name: e4ab094f8afce0817f4074e823fabe59fc29ebb4

10 years agoWork around MSVC not being able to deduce that a local variable was initialized in...
mistachkin [Thu, 16 Oct 2014 21:39:17 +0000 (21:39 +0000)] 
Work around MSVC not being able to deduce that a local variable was initialized in a called function.

FossilOrigin-Name: 06c576c152c4013080c255cbbeb45bf2e298be9f

10 years agoChanges to work around Win32 and MSVCRT APIs that are not present on Windows CE 200x.
mistachkin [Thu, 16 Oct 2014 18:34:50 +0000 (18:34 +0000)] 
Changes to work around Win32 and MSVCRT APIs that are not present on Windows CE 200x.

FossilOrigin-Name: 1418c006e377d7915a50577d4ccb21125b750bae

10 years agoUpdate the vdbe-compress.tcl script to account for expressions of the form (123>var...
dan [Thu, 16 Oct 2014 11:45:14 +0000 (11:45 +0000)] 
Update the vdbe-compress.tcl script to account for expressions of the form (123>var), where "var" should be replaced with a reference to a union member.

FossilOrigin-Name: 640345d880c6178f8434e3ce40329b7527588843

10 years agoUpdate releasetest.tcl so that x86-64 runs a superset of the x86 tests.
dan [Wed, 15 Oct 2014 15:28:27 +0000 (15:28 +0000)] 
Update releasetest.tcl so that x86-64 runs a superset of the x86 tests.

FossilOrigin-Name: 3c1e70f4d55bc009ed9ed4cf6d756d7061985851

10 years agoFix a problem causing lock5.test to fail in mmap-mode.
dan [Wed, 15 Oct 2014 14:45:34 +0000 (14:45 +0000)] 
Fix a problem causing lock5.test to fail in mmap-mode.

FossilOrigin-Name: b3e7b446bdb47cf9d7fe43dc37e3b4f8010ee09e