]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
8 years agoExperimental changes to permit a VFS to directly override the initial page size. pagePerSector
mistachkin [Mon, 23 Jan 2017 21:12:15 +0000 (21:12 +0000)] 
Experimental changes to permit a VFS to directly override the initial page size.

FossilOrigin-Name: 6413172435babe9097e4f961d4b88ddf68e2159d

8 years agoDocument the --mmap option in the --help screen for kvtest. Enhance kvtest so
drh [Mon, 23 Jan 2017 19:11:38 +0000 (19:11 +0000)] 
Document the --mmap option in the --help screen for kvtest.  Enhance kvtest so
that numeric arguments can have suffixes like "K" or "M".  Add kvtest to the
unix makefiles.

FossilOrigin-Name: 175bda87288c7ce15b163316159f53a60822ccad

8 years agoAdd the --mmap option to the kvtest utility program.
drh [Mon, 23 Jan 2017 18:40:15 +0000 (18:40 +0000)] 
Add the --mmap option to the kvtest utility program.

FossilOrigin-Name: 4948f7e6d2a1cfce36a7aab2f5b65be07c285ac3

8 years agoOptimization: Try to avoid unnecessary btree searching when repositioning
drh [Mon, 23 Jan 2017 16:56:18 +0000 (16:56 +0000)] 
Optimization: Try to avoid unnecessary btree searching when repositioning
a cursor to the next row.

FossilOrigin-Name: ee793d30c1dc1f78f49e6230d17750eceedbd8ed

8 years agoAdd the missing SQLITE_API symbol to test_delete.c (it is not added
dan [Mon, 23 Jan 2017 15:58:09 +0000 (15:58 +0000)] 
Add the missing SQLITE_API symbol to test_delete.c (it is not added
automatically as this file is not part of the amalgamation).

FossilOrigin-Name: 7a4f512ddf9e7e718389c80930d6268ab598459c

8 years agoFix a problem preventing FTS5 from correctly passing the FTS5_TOKENIZE_PREFIX
dan [Mon, 23 Jan 2017 07:06:27 +0000 (07:06 +0000)] 
Fix a problem preventing FTS5 from correctly passing the FTS5_TOKENIZE_PREFIX
flag to custom tokenizer implementations.

FossilOrigin-Name: 03c601344ed56b316bcc5fd02f6648b0009ba61b

8 years agoFix an uninitialized variable in the command-line shell.
drh [Sun, 22 Jan 2017 16:34:35 +0000 (16:34 +0000)] 
Fix an uninitialized variable in the command-line shell.

FossilOrigin-Name: 06b8001ade62bc59e6ae20f761167a81d85a4272

8 years agoFixes to documentation comments in the public header file.
mistachkin [Sun, 22 Jan 2017 02:04:05 +0000 (02:04 +0000)] 
Fixes to documentation comments in the public header file.

FossilOrigin-Name: 772dcb08f400f20d4dbfb74df39de78da24ee5fd

8 years agoFix an initialized variable in kvtest.
drh [Sun, 22 Jan 2017 00:11:07 +0000 (00:11 +0000)] 
Fix an initialized variable in kvtest.

FossilOrigin-Name: ed62c5a6562262709128099f757ae60807a930d7

8 years agoA better implementation of the moveto-neighbor optimization that checks for btree-moveto-neighbor
drh [Sat, 21 Jan 2017 21:47:54 +0000 (21:47 +0000)] 
A better implementation of the moveto-neighbor optimization that checks for
nearby rows on adjacent pages.

FossilOrigin-Name: 2c4ecb85a475b9063aa8a3bb517ac181a7ded649

8 years agoB-tree optimization: When seeking on a rowid table that has already been
drh [Sat, 21 Jan 2017 16:54:19 +0000 (16:54 +0000)] 
B-tree optimization:  When seeking on a rowid table that has already been
positioned, check to see if the new row happens to be the next row on the
same leaf page.  That is a reasonably common case, and if it is true it
avoids a full binary search.

FossilOrigin-Name: 8e5cfb2039126da7689c4b1c88760f10e1234eaf

8 years agoChange sqlite3_blob_reopen() to call sqlite3VdbeExec() directly rather than
drh [Sat, 21 Jan 2017 16:27:56 +0000 (16:27 +0000)] 
Change sqlite3_blob_reopen() to call sqlite3VdbeExec() directly rather than
going through sqlite3_step().  Performance enhancement.

FossilOrigin-Name: 347df3c1fd7322e7aacaf1e9f8be81830947c482

8 years agoIn the kvtest.c test utility, reuse the buffer into which blobs are read,
drh [Sat, 21 Jan 2017 15:55:41 +0000 (15:55 +0000)] 
In the kvtest.c test utility, reuse the buffer into which blobs are read,
rather than reallocating it for each row.  This is a closer match to how
other test programs work, and thus provides a better comparison.

FossilOrigin-Name: 0d1ad13a296b22d6fe36879b56f99bd6af1acd3a

8 years agoRemove an unnecessary sqlite3_bind_int64() call from sqlite3_blob_open().
drh [Sat, 21 Jan 2017 14:11:28 +0000 (14:11 +0000)] 
Remove an unnecessary sqlite3_bind_int64() call from sqlite3_blob_open().
Also other minor refactoring of the sqlite3_blob implementation.

FossilOrigin-Name: 9d197a532349f4b1caf66bbed70ca46df86cb86f

8 years agoMinor performance optimization and size reduction to the accessPayload()
drh [Fri, 20 Jan 2017 20:43:14 +0000 (20:43 +0000)] 
Minor performance optimization and size reduction to the accessPayload()
routine in btree.c.

FossilOrigin-Name: 264e5c10d7144910b3223b64546567fa20e4bc65

8 years agoFix a typo in the help message for kvtest.
dan [Fri, 20 Jan 2017 16:47:34 +0000 (16:47 +0000)] 
Fix a typo in the help message for kvtest.

FossilOrigin-Name: 8971d98f25a4f5fb060db8ed6a4b06f083122a50

8 years agoAdd option "--stats" to test program kvtest. Specifying --stats causes kvtest
dan [Fri, 20 Jan 2017 16:46:20 +0000 (16:46 +0000)] 
Add option "--stats" to test program kvtest. Specifying --stats causes kvtest
to output information similar to the shell tool option of the same name.

FossilOrigin-Name: 90291327fc127671d9847a4a2ce1ed47a408cfc6

8 years agoGet the "--testset rtree" option working on speedtest1. Add the --rtree,
drh [Fri, 20 Jan 2017 16:09:12 +0000 (16:09 +0000)] 
Get the "--testset rtree" option working on speedtest1.  Add the --rtree,
--lookaside, and --clang options to the speed-check.sh script.

FossilOrigin-Name: 87b640c8d07a76b2bc7e896e01965cc09e06f77b

8 years agoMinor performance optimizations to sqlite3_blob_open() and
drh [Fri, 20 Jan 2017 00:40:26 +0000 (00:40 +0000)] 
Minor performance optimizations to sqlite3_blob_open() and
sqlite3_blob_reopen().

FossilOrigin-Name: 52a61967d920047ea0b4409b79793e05c0128964

8 years agoIf compiled with SQLITE_INLINE_MEMCPY, all memcpy() calls are replaced with
drh [Thu, 19 Jan 2017 21:20:11 +0000 (21:20 +0000)] 
If compiled with SQLITE_INLINE_MEMCPY, all memcpy() calls are replaced with
in-line code.  With that change, cachegrind shows which memcpy() calls
are taking the most time.  This is a performance-measurement hack only and
is not for production use.

FossilOrigin-Name: 9ed38521617136223a667988aed40e25797faf84

8 years agoIn the 'vtshim' extension, avoid accessing freed memory when handling errors from...
mistachkin [Thu, 19 Jan 2017 18:20:36 +0000 (18:20 +0000)] 
In the 'vtshim' extension, avoid accessing freed memory when handling errors from xCreate/xConnect.

FossilOrigin-Name: ffd559afd32dcdce9c733ebccdee88fda9b689cf

8 years agoIn the 'windirent' test module, use a macro for the hidden/system attribute checking.
mistachkin [Wed, 18 Jan 2017 22:47:42 +0000 (22:47 +0000)] 
In the 'windirent' test module, use a macro for the hidden/system attribute checking.

FossilOrigin-Name: a84a08d0716656dc0b26eafb1841c48d83c67ef2

8 years agoRemove superfluous option to Tcl 'lsort' in the vtabH test file.
mistachkin [Wed, 18 Jan 2017 22:19:01 +0000 (22:19 +0000)] 
Remove superfluous option to Tcl 'lsort' in the vtabH test file.

FossilOrigin-Name: b92cc6e58ae31cbe6600a522beb5485f7add04b2

8 years agoMake the vtabH-3.1 test more portable and robust.
mistachkin [Wed, 18 Jan 2017 22:16:34 +0000 (22:16 +0000)] 
Make the vtabH-3.1 test more portable and robust.

FossilOrigin-Name: d3c91c1fb345fbcbfc60a897bebf771c795430c9

8 years agoFix handling of initial hidden and/or system files in the opendir() implementation...
mistachkin [Wed, 18 Jan 2017 22:16:20 +0000 (22:16 +0000)] 
Fix handling of initial hidden and/or system files in the opendir() implementation for Windows.  No changes to non-test code.

FossilOrigin-Name: 26dd42b462dc621b8b0a2295fc91d3e61ac732b6

8 years agoFix a problem that could cause a spurious SQLITE_NOMEM error when attempting
dan [Tue, 17 Jan 2017 10:41:42 +0000 (10:41 +0000)] 
Fix a problem that could cause a spurious SQLITE_NOMEM error when attempting
to resume an RBU operation if the previous client failed right after
completing the incremental checkpoint. Also a "cannot vacuum wal db" error
that could occur when resuming an RBU vacuum if an error (OOM or IO error)
occurs during the incremental checkpoint.

FossilOrigin-Name: 681d96eb822e606da53700867191d4738bda20c8

8 years agoDisable intrinsic functions for Windows using Clang, due to reports of
drh [Tue, 17 Jan 2017 00:10:58 +0000 (00:10 +0000)] 
Disable intrinsic functions for Windows using Clang, due to reports of
linkage errors.  This causes a 0.6% performance reduction.  We will want to
revisit this change in the future.

FossilOrigin-Name: 7fd560c6d2ff470b755ad118287a0a8825b3009e

8 years agoBack out check-in [0b3174e0b1364c] and replace it with a better fix for \ticket ...
drh [Mon, 16 Jan 2017 18:10:17 +0000 (18:10 +0000)] 
Back out check-in [0b3174e0b1364c] and replace it with a better fix for \ticket [91e2e8ba6ff2e2] - a fix that does not cause the problem identified by
ticket [7ffd1ca1d2ad4ec]. Add new test cases for both tickets.

FossilOrigin-Name: 9b64af7b5201a8700ae9e384b04714ca18df7449

8 years agoBack out check-in [0b3174e0b1364c] and replace it with a better fix automatic-index-affinity
drh [Mon, 16 Jan 2017 16:43:02 +0000 (16:43 +0000)] 
Back out check-in [0b3174e0b1364c] and replace it with a better fix
for ticket [91e2e8ba6ff2e2] - a fix that does not cause the problem
identified by ticket [7ffd1ca1d2ad4ec].

FossilOrigin-Name: 0613665274346917f5482f9210bf0c60a0fed7d9

8 years agoAdd test cases for tickets [91e2e8ba6ff2e2] and [7ffd1ca1d2ad4ec].
drh [Mon, 16 Jan 2017 16:01:50 +0000 (16:01 +0000)] 
Add test cases for tickets [91e2e8ba6ff2e2] and [7ffd1ca1d2ad4ec].

FossilOrigin-Name: 9d0dfe0b088a5917afa06207ca3ac5618e3da82f

8 years agoFix a problem preventing resumption of RBU operations after recovering from a
dan [Fri, 13 Jan 2017 18:24:37 +0000 (18:24 +0000)] 
Fix a problem preventing resumption of RBU operations after recovering from a
process or system failure that occurs during the incremental-checkpoint phase.

FossilOrigin-Name: 97914266cb4ec63b0c9185ab139673139bd2f0ed

8 years agoFix the build for SQLITE_ENABLE_MEMORY_MANAGEMENT.
drh [Fri, 13 Jan 2017 12:53:35 +0000 (12:53 +0000)] 
Fix the build for SQLITE_ENABLE_MEMORY_MANAGEMENT.

FossilOrigin-Name: 8c85b8fdd7f0ba65fba83361d361a567b797a184

8 years agoRemove a branch that is probably unreachable, and which adds no value.
drh [Thu, 12 Jan 2017 19:10:55 +0000 (19:10 +0000)] 
Remove a branch that is probably unreachable, and which adds no value.

FossilOrigin-Name: 9acc72381ccd5e36f3ffdf7e7fbefc5a15701eb4

8 years agoFix harmless compiler warnings in the UPDATE code generator.
drh [Thu, 12 Jan 2017 16:21:54 +0000 (16:21 +0000)] 
Fix harmless compiler warnings in the UPDATE code generator.

FossilOrigin-Name: 385db266673abaf7013ffad09b28014c246547ef

8 years agoRemove an unnecessary corruption test from the btree balancer. If corruption
drh [Thu, 12 Jan 2017 16:14:33 +0000 (16:14 +0000)] 
Remove an unnecessary corruption test from the btree balancer.  If corruption
is present, it will be found harmlessly by later tests.

FossilOrigin-Name: bddf39562d08e259c43dd59b82afb62fe0eb2eef

8 years agoImproved detection of cells that extend into the reserved space at the end
drh [Thu, 12 Jan 2017 15:11:03 +0000 (15:11 +0000)] 
Improved detection of cells that extend into the reserved space at the end
of the page while adjusting overflow page pointers during autovacuum.

FossilOrigin-Name: 8097712c9c1f4ea16bc5dd462da248ef98896061

8 years agoRemove invalid test case from cursorhints2.test
drh [Thu, 12 Jan 2017 11:52:47 +0000 (11:52 +0000)] 
Remove invalid test case from cursorhints2.test

FossilOrigin-Name: 163cc1b2f7100827d5803b81dcd97a1417744f66

8 years agoMake sure Tcl_AppendResult() always has a NULL-pointer argument at the end.
drh [Thu, 12 Jan 2017 11:50:08 +0000 (11:50 +0000)] 
Make sure Tcl_AppendResult() always has a NULL-pointer argument at the end.

FossilOrigin-Name: c07aef6f909fe35de110f0b180dbf5aa4c226af3

8 years agoChanges to allow some multi-row UPDATE statements to avoid the two-pass
dan [Wed, 11 Jan 2017 21:03:53 +0000 (21:03 +0000)] 
Changes to allow some multi-row UPDATE statements to avoid the two-pass
approach.

FossilOrigin-Name: 7ae6104a3e0d1d2cacfe2be732f0220a53908132

8 years agoFix a problem causing the pre-update hook to be passed an incorrect rowid onepass-update
dan [Wed, 11 Jan 2017 20:10:30 +0000 (20:10 +0000)] 
Fix a problem causing the pre-update hook to be passed an incorrect rowid
value in some single-pass multi-row updates.

FossilOrigin-Name: 62257eb53c13d4c7ed128d5d89f6f10d4aff945c

8 years agoFix a problem with single-pass multi-row UPDATE statements that invoke REPLACE
dan [Wed, 11 Jan 2017 19:03:08 +0000 (19:03 +0000)] 
Fix a problem with single-pass multi-row UPDATE statements that invoke REPLACE
conflict handling.

FossilOrigin-Name: 0a2b8e1b9dc600b5a93622e8eea6218649df5e0f

8 years agoFix a problem preventing UPDATE statements that use a range-scan on the PK
dan [Wed, 11 Jan 2017 15:42:14 +0000 (15:42 +0000)] 
Fix a problem preventing UPDATE statements that use a range-scan on the PK
index of a WITHOUT ROWID table from using a one-pass strategy.

FossilOrigin-Name: cab86c90945126c24c40cf2dedd053a8c46d00d6

8 years agoIn the STAT4 computations, ensure that the aAvgEq values do not go negative.
drh [Wed, 11 Jan 2017 14:15:29 +0000 (14:15 +0000)] 
In the STAT4 computations, ensure that the aAvgEq values do not go negative.

FossilOrigin-Name: f58f75b5a06f88ba97bd1a02bee621c64691c6f8

8 years agoChanges to allow some multi-row UPDATE statements to avoid the two-pass
dan [Tue, 10 Jan 2017 20:04:38 +0000 (20:04 +0000)] 
Changes to allow some multi-row UPDATE statements to avoid the two-pass
approach.

FossilOrigin-Name: 46db23ccd116ce5b9d949f9293be8a2818411b46

8 years agoAdd a test case for ticket [25e335f802dd].
dan [Tue, 10 Jan 2017 17:37:49 +0000 (17:37 +0000)] 
Add a test case for ticket [25e335f802dd].

FossilOrigin-Name: e500c15a9f55aed1601f7c14169dd56fd76f1fdd

8 years agoThrow an error if the ON clause of a LEFT JOIN references tables to the right
drh [Tue, 10 Jan 2017 17:33:43 +0000 (17:33 +0000)] 
Throw an error if the ON clause of a LEFT JOIN references tables to the right
of the ON clause.  Fix for ticket [25e335f802dd].

FossilOrigin-Name: c92ecff2ec5f178433d21f25c653d0fdd9128d7c

8 years agoAvoid unnecessary calls to the xRoundup() method of the memory allocator when
drh [Tue, 10 Jan 2017 16:09:46 +0000 (16:09 +0000)] 
Avoid unnecessary calls to the xRoundup() method of the memory allocator when
the soft heap limit is not set.

FossilOrigin-Name: 4209b89eab01814228a178963238e0dffffad2a4

8 years agoFix a potential assertion fault discovered by OSS-Fuzz.
drh [Tue, 10 Jan 2017 15:08:06 +0000 (15:08 +0000)] 
Fix a potential assertion fault discovered by OSS-Fuzz.

FossilOrigin-Name: 71c03b59b645884ebd6b9e18713cd2eb8c949870

8 years agoRemove a redundant assignment statement.
drh [Mon, 9 Jan 2017 19:55:19 +0000 (19:55 +0000)] 
Remove a redundant assignment statement.

FossilOrigin-Name: a5fa09657bd6c4ea5fe6712b0f8af2170cbe0381

8 years agoPerformance optimization and size reduction in the OP_Variable opcode.
drh [Mon, 9 Jan 2017 19:27:04 +0000 (19:27 +0000)] 
Performance optimization and size reduction in the OP_Variable opcode.

FossilOrigin-Name: 237aa97452e20c312f256a8fd62531e3d447f84b

8 years agoFix typo in a comment. No changes to code.
mistachkin [Mon, 9 Jan 2017 18:22:54 +0000 (18:22 +0000)] 
Fix typo in a comment.  No changes to code.

FossilOrigin-Name: d38fd22935b1572f4481b39c2f9274329b18ea99

8 years agoModify the OP_RowData opcode so that when P3!=0 it is allowed to hold an
drh [Mon, 9 Jan 2017 15:44:25 +0000 (15:44 +0000)] 
Modify the OP_RowData opcode so that when P3!=0 it is allowed to hold an
ephemeral copy of the content.  This avoids unnecessary memcpy() operations
in the xfer-optimization and VACUUM.

FossilOrigin-Name: 6e106acd74da3baa5c308a76443d2f0a7c904e5e

8 years agoAdd the SQLITE_UINT64_TYPE compile-time option.
drh [Mon, 9 Jan 2017 13:43:09 +0000 (13:43 +0000)] 
Add the SQLITE_UINT64_TYPE compile-time option.

FossilOrigin-Name: a5fe03bc419d9c7e6068ed38810e3f183de179b5

8 years agoImprovements to the iIdxNoSeek optimization of sqlite3GenerateRowDelete()
drh [Sat, 7 Jan 2017 14:47:03 +0000 (14:47 +0000)] 
Improvements to the iIdxNoSeek optimization of sqlite3GenerateRowDelete()
so that it is automatically disabled for BEFORE triggers but works in all
other cases.

FossilOrigin-Name: 3178ec4c27efc4ff84bcd17ddb17ec50a6ac96b3

8 years agoCritical fix to the previous check-in so that it works when there are
drh [Sat, 7 Jan 2017 14:26:28 +0000 (14:26 +0000)] 
Critical fix to the previous check-in so that it works when there are
BEFORE triggers that move the cursor before the OP_Delete has a chance to
be applied.

FossilOrigin-Name: db2c0960ffb3b396b20e0441d3edb812254c82bc

8 years agoAvoid an unnecessary btree seek while deleting an index entry due to a conflict
drh [Sat, 7 Jan 2017 03:26:50 +0000 (03:26 +0000)] 
Avoid an unnecessary btree seek while deleting an index entry due to a conflict
on a REPLACE operation.

FossilOrigin-Name: f0495c5133d0dc04d63521136d6b9ca440792cdf

8 years agoAvoid duplicate b-tree searches in the duplicate row detector used to
drh [Sat, 7 Jan 2017 00:56:01 +0000 (00:56 +0000)] 
Avoid duplicate b-tree searches in the duplicate row detector used to
implement DISTINCT.

FossilOrigin-Name: d577dda0a7fbfacda57e8cad2bc4651d2a05d813

8 years agoEnsure that "PRAGMA case_sensitive_like" and "PRAGMA shrink_memory" set the
dan [Fri, 6 Jan 2017 13:49:40 +0000 (13:49 +0000)] 
Ensure that "PRAGMA case_sensitive_like" and "PRAGMA shrink_memory" set the
number of output columns to 0 (as they are statements that return no data).

FossilOrigin-Name: 6696cd1878be4bd44a24841b04163e52d847711e

8 years agoImprove handling of corrupt data in fts5.
dan [Fri, 6 Jan 2017 11:55:03 +0000 (11:55 +0000)] 
Improve handling of corrupt data in fts5.

FossilOrigin-Name: 609ac1c73f7c2b48a571c178a72383996a9538fe

8 years agoClarify the documentation on sqlite3_column_count().
drh [Fri, 6 Jan 2017 01:09:43 +0000 (01:09 +0000)] 
Clarify the documentation on sqlite3_column_count().

FossilOrigin-Name: 9ea0baddd893e54ec79399ae83033ae139650535

8 years agoRemove several non-portable tests for the deprecated temp_store_directory PRAGMA.
mistachkin [Fri, 6 Jan 2017 00:02:51 +0000 (00:02 +0000)] 
Remove several non-portable tests for the deprecated temp_store_directory PRAGMA.

FossilOrigin-Name: 28d87789141d816e0bce6d3965ce84c79b803218

8 years agoEnsure that sqlite3_column_count() returns 0 for the "set" mode of "get/set"
dan [Thu, 5 Jan 2017 20:00:08 +0000 (20:00 +0000)] 
Ensure that sqlite3_column_count() returns 0 for the "set" mode of "get/set"
PRAGMA statements that do not return a value in that case (e.g. page_size,
cache_size, auto_vacuum).

FossilOrigin-Name: 2f57939a5583ae420b525c7e0f0dcda8626fe992

8 years agoEnsure that sqlite3_column_count() returns 0 for the "set" mode of "get/set" pragma-columncount-fix
dan [Thu, 5 Jan 2017 19:32:48 +0000 (19:32 +0000)] 
Ensure that sqlite3_column_count() returns 0 for the "set" mode of "get/set"
PRAGMA statements that do not return a value in that case (e.g. page_size,
cache_size, auto_vacuum).

FossilOrigin-Name: 5c05d8ec5e895661dae2de30c73dfdeaff93511e

8 years agoFix handling the case where a sub-query in a FROM clause is itself a UNION
dan [Thu, 5 Jan 2017 17:23:11 +0000 (17:23 +0000)] 
Fix handling the case where a sub-query in a FROM clause is itself a UNION
ALL, and one side of that UNION ALL is a query on a view that includes an
ORDER BY. Fix for ticket [190c2507].

FossilOrigin-Name: 590ca83b8e8cdd5d24ed7f10f43e540aa0627f22

8 years agoFix problems in trigger and foreign key handling when doing REPLACE on a
drh [Thu, 5 Jan 2017 13:50:12 +0000 (13:50 +0000)] 
Fix problems in trigger and foreign key handling when doing REPLACE on a
WITHOUT ROWID table that has no secondary indexes.

FossilOrigin-Name: 571f166ea8721e2322965b6f23e758b78d13baca

8 years agoEnsure that the sqlite3_value_text() interface returns a buffer that is long
drh [Thu, 5 Jan 2017 07:58:29 +0000 (07:58 +0000)] 
Ensure that the sqlite3_value_text() interface returns a buffer that is long
enough to hold the complete string plus the zero terminator even when the
input is a zeroblob.  Fix for a problem detected by OSS-Fuzz.

FossilOrigin-Name: 2dc7eeb5b4d2eaf1d843eda56f339fd4cc80d78e

8 years agoFix some problems with foreign key processing within REPLACE ops on WITHOUT replace-fix
dan [Thu, 5 Jan 2017 06:57:42 +0000 (06:57 +0000)] 
Fix some problems with foreign key processing within REPLACE ops on WITHOUT
ROWID tables with no triggers or auxiliary indexes.

FossilOrigin-Name: c1220b1af62629d7fc2178512786d613cd7ea711

8 years agoImproved the comment on the block of code the provides the performance
drh [Wed, 4 Jan 2017 22:02:56 +0000 (22:02 +0000)] 
Improved the comment on the block of code the provides the performance
optimization originally added by check-in [925840cfdb].  The original
check-in omitted condition 4, which was the cause of bug [30027b613b].

FossilOrigin-Name: c6506b82aa6583ccde5f673c79526d5f3920b67a

8 years agoPossible fix for 30027b61. There may still be problems surrounding foreign key
dan [Wed, 4 Jan 2017 20:13:51 +0000 (20:13 +0000)] 
Possible fix for 30027b61. There may still be problems surrounding foreign key
processing.

FossilOrigin-Name: 71ccb1f4c490fdebc7008e884384e7809b849742

8 years agoAdjust filename creation in test_sqllog.c so that it uses leading zeros on
drh [Wed, 4 Jan 2017 14:53:53 +0000 (14:53 +0000)] 
Adjust filename creation in test_sqllog.c so that it uses leading zeros on
counters, so that files appear in order when sorted lexicographically.

FossilOrigin-Name: 8d670973595bd01ffc9b2ab53b965e6d6d22c573

8 years agoPerformance enhancements in the printf implementation.
drh [Wed, 4 Jan 2017 13:09:05 +0000 (13:09 +0000)] 
Performance enhancements in the printf implementation.

FossilOrigin-Name: 82e4001b8caef7b31967f3edcbc1a545c081bdbc

8 years agoFactor constant functions out of the inner loop since they are more expensive
drh [Wed, 4 Jan 2017 04:18:00 +0000 (04:18 +0000)] 
Factor constant functions out of the inner loop since they are more expensive
than the extra OP_Copy needed to move the result into place.

FossilOrigin-Name: 80ad317f89c46db0d0d252aefdc036a34a61183d

8 years agoClean up the implementation of constant function factorization. factor-constant-funcs
drh [Wed, 4 Jan 2017 04:10:02 +0000 (04:10 +0000)] 
Clean up the implementation of constant function factorization.

FossilOrigin-Name: 2ab997e47998d261bd6190bbce5c09f3fbd4cfd3

8 years agoAttempt to factor out constant functions from the interior of table scans,
drh [Wed, 4 Jan 2017 01:07:24 +0000 (01:07 +0000)] 
Attempt to factor out constant functions from the interior of table scans,
since functions can often be expensive to compute.

FossilOrigin-Name: 62e9270a8057d758621da33adb27fad14225f95d

8 years agoChanges to the printf implementation for better performance. printf-optimization
drh [Wed, 4 Jan 2017 00:26:28 +0000 (00:26 +0000)] 
Changes to the printf implementation for better performance.

FossilOrigin-Name: acdb8f6f10953ed4290aadc9e026edd57d1dd21a

8 years agoUse compiler intrinsic functions for signed integer math when overflow
drh [Tue, 3 Jan 2017 21:57:11 +0000 (21:57 +0000)] 
Use compiler intrinsic functions for signed integer math when overflow
detection is needed.

FossilOrigin-Name: d3ac32a6e7f1823450feb3d1089802542090d164

8 years agoBack out the use of __sync_fetch_and_sub() as it does not appear to work. gnu-safe-math
drh [Tue, 3 Jan 2017 21:50:49 +0000 (21:50 +0000)] 
Back out the use of __sync_fetch_and_sub() as it does not appear to work.

FossilOrigin-Name: 4c2efd4239bf07eb4b92d4af54edd68ee6312670

8 years agoFix a typo in a comment.
drh [Tue, 3 Jan 2017 21:03:37 +0000 (21:03 +0000)] 
Fix a typo in a comment.

FossilOrigin-Name: ae087123db8e7d47b25a8d0a98cfd62e85e42fc6

8 years agoUse the CLANG_VERSION macro to control clang-specific features.
drh [Tue, 3 Jan 2017 20:01:24 +0000 (20:01 +0000)] 
Use the CLANG_VERSION macro to control clang-specific features.

FossilOrigin-Name: f8ebeec211483503e135104ef977b3c384a1d789

8 years agoUse the GCC built-in __sync_fetch_and_sub() to make the sqlite3StatusDown()
drh [Tue, 3 Jan 2017 18:05:04 +0000 (18:05 +0000)] 
Use the GCC built-in __sync_fetch_and_sub() to make the sqlite3StatusDown()
routine atomic, and thereby avoid some mutexing.

FossilOrigin-Name: f69ce75b3d94331fdbfa2f3a27d61db24c285d2b

8 years agoMake use of the __buildin_OP_overflow() functions from GCC when doing
drh [Tue, 3 Jan 2017 17:33:43 +0000 (17:33 +0000)] 
Make use of the __buildin_OP_overflow() functions from GCC when doing
64-bit signed integer arithmetic.

FossilOrigin-Name: 82cbebb8ee4484f13e5f48d305e20e73063f273e

8 years agoAdd the experimental affinity() SQL function when SQLITE_DEBUG is defined.
drh [Tue, 3 Jan 2017 14:45:35 +0000 (14:45 +0000)] 
Add the experimental affinity() SQL function when SQLITE_DEBUG is defined.

FossilOrigin-Name: bed0eaa5f50112e64fc97a2afdc9d56cf8f5026a

8 years agoPut the affinity() function implementation inside of #ifdef SQLITE_DEBUG. affinity-sql-func
drh [Tue, 3 Jan 2017 14:39:30 +0000 (14:39 +0000)] 
Put the affinity() function implementation inside of #ifdef SQLITE_DEBUG.

FossilOrigin-Name: f778f58ae4ea3e16f51b94591a2c1e563dcb0cde

8 years agoMerge all the latest changes from trunk.
drh [Tue, 3 Jan 2017 14:30:28 +0000 (14:30 +0000)] 
Merge all the latest changes from trunk.

FossilOrigin-Name: c27cd8a8127b81d3176f6a5b9915c9b3c69574fb

8 years agoDefer size checking on row-value assignments for when the RHS is a SELECT
drh [Tue, 3 Jan 2017 13:45:22 +0000 (13:45 +0000)] 
Defer size checking on row-value assignments for when the RHS is a SELECT
until after the "*" wildcards have been expanded.

FossilOrigin-Name: 36944be6be5c42096f5da84187ff203af26b08ae

8 years agoFix a typo on a comment. No code changes.
drh [Tue, 3 Jan 2017 11:59:54 +0000 (11:59 +0000)] 
Fix a typo on a comment.  No code changes.

FossilOrigin-Name: abc27b6023e28a717bfa15648ddc152bda9c7b96

8 years agoAdd test cases for the fix in [f12ed3ce]. No problems discovered.
dan [Tue, 3 Jan 2017 08:11:24 +0000 (08:11 +0000)] 
Add test cases for the fix in [f12ed3ce]. No problems discovered.

FossilOrigin-Name: 548532fdcf84d565c17aed79a6b595e8b62a3ab4

8 years agoImprovements to the way vector assignment size checking is done. Size checks vector-size-check
drh [Tue, 3 Jan 2017 02:58:01 +0000 (02:58 +0000)] 
Improvements to the way vector assignment size checking is done.  Size checks
when the RHS is a SELECT are deferred until after "*" wildcards are expanded.

FossilOrigin-Name: 696219b11049930cdbc38f574820f4bbaf8621bb

8 years agoFix the row-values in UPDATE statements within TRIGGER problem identified
drh [Tue, 3 Jan 2017 01:24:10 +0000 (01:24 +0000)] 
Fix the row-values in UPDATE statements within TRIGGER problem identified
by ticket [8c9458e7].

FossilOrigin-Name: f12ed3ce0bfb2d94c9baad23fdcbd816c72439a1

8 years agoImproved assert()s on the sqlite3ExprListDup() logic for TK_SELECT_COLUMN. rowvalue-update-trigger
drh [Tue, 3 Jan 2017 00:27:16 +0000 (00:27 +0000)] 
Improved assert()s on the sqlite3ExprListDup() logic for TK_SELECT_COLUMN.

FossilOrigin-Name: 14da99d41f7968bf816203b4ae11c1f0d1ee0b5d

8 years agoTest cases for the row-value UPDATE TRIGGER fix.
drh [Mon, 2 Jan 2017 23:43:03 +0000 (23:43 +0000)] 
Test cases for the row-value UPDATE TRIGGER fix.

FossilOrigin-Name: b9b964373c89a491649f366ad7d70ae4d69b891d

8 years agoPut an ALWAYS() on an unreachable branch in the sqlite3ExprListDup() routine.
drh [Mon, 2 Jan 2017 23:18:35 +0000 (23:18 +0000)] 
Put an ALWAYS() on an unreachable branch in the sqlite3ExprListDup() routine.

FossilOrigin-Name: 2caaaab5e07f6b76d66fbe4e93a4b956937427d8

8 years agoProposed fix for the row-value TRIGGER UPDATE problem described in
drh [Mon, 2 Jan 2017 22:36:32 +0000 (22:36 +0000)] 
Proposed fix for the row-value TRIGGER UPDATE problem described in
ticket [8c9458e7].

FossilOrigin-Name: 61a442ea2ceec2cbd327dae0ff5214e1f3c69ec0

8 years agoIncrease the version number to 3.17.0 for the next release cycle.
drh [Mon, 2 Jan 2017 19:10:14 +0000 (19:10 +0000)] 
Increase the version number to 3.17.0 for the next release cycle.

FossilOrigin-Name: 16415b5aad445c9e4e849018b48538d74eec8944

8 years agoProvide the SQLITE_DEFAULT_LOOKASIDE compile-time option and make it's default
drh [Mon, 2 Jan 2017 19:02:20 +0000 (19:02 +0000)] 
Provide the SQLITE_DEFAULT_LOOKASIDE compile-time option and make it's default
value be 1200,100 (raised from 512,125 in the latest release).

FossilOrigin-Name: 584da48f9e818f25134e0a62fb7e84f07019511f

8 years agoChange SQLITE_DEFAULT_PCACHE_INITSZ from 100 to 20, which is experimentally
drh [Mon, 2 Jan 2017 18:40:03 +0000 (18:40 +0000)] 
Change SQLITE_DEFAULT_PCACHE_INITSZ from 100 to 20, which is experimentally
determined to be slightly faster.

FossilOrigin-Name: 12d9493cb29307aec65ceccc68e802e4d0f18112

8 years agoAvoid unnecessary calls to sqlite3BtreeEnterAll() and sqlite3BtreeLeaveAll()
drh [Mon, 2 Jan 2017 18:19:29 +0000 (18:19 +0000)] 
Avoid unnecessary calls to sqlite3BtreeEnterAll() and sqlite3BtreeLeaveAll()
when no btree is using shared-cache.

FossilOrigin-Name: cfb3158204628eb2fd170090a7f212df0e4ce6c9

8 years agoAdd the --all option to the wordcount test program.
drh [Mon, 2 Jan 2017 12:20:15 +0000 (12:20 +0000)] 
Add the --all option to the wordcount test program.
Fix the speedtest1 test program so that it builds on MSVC and so that
the --lookaside 0 0 option works.

FossilOrigin-Name: cb338f367e5408861bd7c0fbf74cebdbd8e3c515

8 years agoVersion 3.16.0 version-3.16.0
drh [Mon, 2 Jan 2017 11:57:58 +0000 (11:57 +0000)] 
Version 3.16.0

FossilOrigin-Name: 04ac0b75b1716541b2b97704f4809cb7ef19cccf

8 years agoDetect row-value comparison size mismatches even when the size of one
drh [Sun, 1 Jan 2017 12:44:07 +0000 (12:44 +0000)] 
Detect row-value comparison size mismatches even when the size of one
operand is obscured by an unexpanded subquery.

FossilOrigin-Name: 2c4d167ccd4be591487f404de9ee629fd484c8bf