]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
7 years agoFix an assertion failure triggered by a SELECT with a compound sub-query that
dan [Sat, 31 Mar 2018 16:31:51 +0000 (16:31 +0000)] 
Fix an assertion failure triggered by a SELECT with a compound sub-query that
contains an incorrectly placed ORDER BY clause. This problem is just an
assert() failure - non-DEBUG builds are not affected. Problem found by
OSSFuzz.

FossilOrigin-Name: 823779d31eb09cda5effe747d9adb35e600a52d4274226586437f674e7824d91

7 years agoFix a bug in the spellfix extension causing it to compute suboptimal answers.
drh [Fri, 30 Mar 2018 16:34:04 +0000 (16:34 +0000)] 
Fix a bug in the spellfix extension causing it to compute suboptimal answers.
The problem was introduced by check-in [afd6fbc01052ccfc9].

FossilOrigin-Name: 3bf28fd9a70ebefc464dceda124d6ed342dd83f71eeeb0568f79e34e731a073e

7 years agoFix an off-by-one error in the dist3 algorithm of the spellfix extension.
drh [Fri, 30 Mar 2018 15:59:54 +0000 (15:59 +0000)] 
Fix an off-by-one error in the dist3 algorithm of the spellfix extension.

FossilOrigin-Name: 5c34af7b975598bbe20751dfdd346f43031cb2bcb6b78f1bbdb2b51b398de182

7 years agoAnother change to test file zipfile.test to help it run on systems without "unzip".
dan [Thu, 29 Mar 2018 23:54:00 +0000 (23:54 +0000)] 
Another change to test file zipfile.test to help it run on systems without "unzip".

FossilOrigin-Name: b6252feb125db16dabf6ce07568159f0002f9053df1b7b600e2614cc9da24873

7 years agoFix a test script bug causing zipfile.test to fail on systems that do not have
dan [Thu, 29 Mar 2018 16:39:09 +0000 (16:39 +0000)] 
Fix a test script bug causing zipfile.test to fail on systems that do not have
the "unzip" program installed.

FossilOrigin-Name: d99022a5a8e4469a87a9fab8a976271e5785524da73ac1d2fae47d00d90fc07a

7 years agoModify the sqlite3OsFileControl() interface to detect unopened sqlite3_file
drh [Thu, 29 Mar 2018 13:47:01 +0000 (13:47 +0000)] 
Modify the sqlite3OsFileControl() interface to detect unopened sqlite3_file
objects and return SQLITE_NOTFOUND.

FossilOrigin-Name: 1fc72b707d4f4df049c19b023ae3f70cb45d6a6768bb68efc519cfdcd2d2ecda

7 years agoUpdate memdb1.test so that it works with SQLITE_DEFAULT_AUTOVACUUM builds.
dan [Thu, 29 Mar 2018 11:02:19 +0000 (11:02 +0000)] 
Update memdb1.test so that it works with SQLITE_DEFAULT_AUTOVACUUM builds.

FossilOrigin-Name: d67f1c7d18d076b18e327ae4e3bccf6086b8f3fd370a7550d77753fc1f1ce07f

7 years agoFix a harmless compiler warning in the kvtest.exe program.
drh [Wed, 28 Mar 2018 22:08:44 +0000 (22:08 +0000)] 
Fix a harmless compiler warning in the kvtest.exe program.

FossilOrigin-Name: d48972cf873f8e2499f7c77f8062fde439e7426b616514c147810763469d7c6a

7 years agoFix a harmless compiler warning.
drh [Wed, 28 Mar 2018 21:45:03 +0000 (21:45 +0000)] 
Fix a harmless compiler warning.

FossilOrigin-Name: f0d12354bba96056f930e5ed3e88c37ec139211be09e6cd6eb7310e979de56c8

7 years agoAdd -DSQLITE_ENABLE_DESERIALIZE to the "Device-Two" configuration in
dan [Wed, 28 Mar 2018 20:29:04 +0000 (20:29 +0000)] 
Add -DSQLITE_ENABLE_DESERIALIZE to the "Device-Two" configuration in
releasetest.tcl.

FossilOrigin-Name: 765a014d8e91be18ac0f12f0fe94f4126bf8ce101f5c9d7f234376e2368f6db3

7 years agoRemove tab characters. No logical changes to code.
drh [Wed, 28 Mar 2018 15:56:55 +0000 (15:56 +0000)] 
Remove tab characters.  No logical changes to code.

FossilOrigin-Name: eb29b3369e76ec1df25a5484d8ec5fb924e23d5c70aaa4d794b2b17ee18784c8

7 years agoMinor comment changes.
drh [Wed, 28 Mar 2018 15:06:39 +0000 (15:06 +0000)] 
Minor comment changes.

FossilOrigin-Name: d282f064698782cf7b584138549a6b27befa0b945ae96b52a3ef6f8a13448077

7 years agoFix a typo in the README file for ICU. No code changes.
drh [Tue, 27 Mar 2018 22:58:45 +0000 (22:58 +0000)] 
Fix a typo in the README file for ICU.  No code changes.

FossilOrigin-Name: 79c4383b66fee9d43a75eef30ed0364573fc99e6d3be12267a99773ab8f57a9f

7 years agoThe push-down optimization was being too aggressive such that it sometimes
drh [Tue, 27 Mar 2018 15:13:43 +0000 (15:13 +0000)] 
The push-down optimization was being too aggressive such that it sometimes
generated incorrect results.  Reinstate the restriction (4) (with
qualifications) that was removed by check-ins
[b5d3dd8cb0b1e4] and [dd568c27b1d765].

FossilOrigin-Name: f08c1731b0b1dddcba190b094a35306a159713d3db939330f73075ff1d72c81e

7 years agoProvide the ability for the VFS to do a blocking wait on locks if compiled
drh [Tue, 27 Mar 2018 13:57:31 +0000 (13:57 +0000)] 
Provide the ability for the VFS to do a blocking wait on locks if compiled
with SQLITE_ENABLE_SETLK_TIMEOUT.

FossilOrigin-Name: e7dff982be753bc93123db6a0e8fefd56f2a14fd1c9a8699af0b6b75bc88fc15

7 years agoDo not inject OOM errors on SQLITE_FCNTL_LOCK_TIMEOUT calls as an OOM is lowlevel-lock-timeout
drh [Mon, 26 Mar 2018 21:05:47 +0000 (21:05 +0000)] 
Do not inject OOM errors on SQLITE_FCNTL_LOCK_TIMEOUT calls as an OOM is
not possible in that context.

FossilOrigin-Name: 5474e560eeb0269964b70bcd876bb86b4197c4fb164bc13454fb8204f083062c

7 years agoAvoid a race condition that might cause a busy_timeout to last longer than
drh [Mon, 26 Mar 2018 20:43:05 +0000 (20:43 +0000)] 
Avoid a race condition that might cause a busy_timeout to last longer than
it should.

FossilOrigin-Name: b81960561b47a1b49646f2f8870dd0684dc4ca7c0b9e11076fd713de66b75972

7 years agoFix a typo preventing test script avtrans.test from running in auto-vacuum
dan [Mon, 26 Mar 2018 17:56:39 +0000 (17:56 +0000)] 
Fix a typo preventing test script avtrans.test from running in auto-vacuum
mode.

FossilOrigin-Name: c7473bdb1055df06dc6a93a39ba7f56116f6866292784c4938d843531500c368

7 years agoAdd infrastructure to support for using F_SETLKW with a timeout on system
drh [Mon, 26 Mar 2018 17:40:53 +0000 (17:40 +0000)] 
Add infrastructure to support for using F_SETLKW with a timeout on system
that support that functionality.  Requires SQLITE_ENABLE_SETLK_TIMEOUT.

FossilOrigin-Name: 2e54a7433ece4eb27e71bda6f2d121d5aa46ddd5a481357d8543d1432aaad689

7 years agoRefactor some internal object element names used by the busy handler, to
drh [Mon, 26 Mar 2018 16:37:53 +0000 (16:37 +0000)] 
Refactor some internal object element names used by the busy handler, to
simplify analysis.

FossilOrigin-Name: 6c40c5574f4ae9795a142d01a8f84afd1b72678ea5f6bfca14a8646c4e862605

7 years agoFix a couple issues in the 'session' module tests.
mistachkin [Sat, 24 Mar 2018 23:16:05 +0000 (23:16 +0000)] 
Fix a couple issues in the 'session' module tests.

FossilOrigin-Name: ccf734f7d2bf8f99f3c55124b05c1835e4371bc269f27700f40afc26e7c1bc55

7 years agoFix harmless compiler warning seen with MSVC.
mistachkin [Sat, 24 Mar 2018 20:06:52 +0000 (20:06 +0000)] 
Fix harmless compiler warning seen with MSVC.

FossilOrigin-Name: e9508ab1f86ac70a3ca5622ce44141bc05186b199bf32fb8739aef36b95aa05c

7 years agoAdd testcase() macros and improve comments in the LEFT JOIN strength reduction
drh [Sat, 24 Mar 2018 18:01:51 +0000 (18:01 +0000)] 
Add testcase() macros and improve comments in the LEFT JOIN strength reduction
optimization.

FossilOrigin-Name: 5613457714dd74d6da8e387132a0d8e64980ba4a921a9f53773540b02c0ccec6

7 years agoYet another fault in the sqlite3ExprImpliesNotNull() routine, causing errors
drh [Sat, 24 Mar 2018 15:47:31 +0000 (15:47 +0000)] 
Yet another fault in the sqlite3ExprImpliesNotNull() routine, causing errors
in the LEFT JOIN strength reduction optimization of check-in
[dd568c27b1d76563].

FossilOrigin-Name: e88cf3d4df64097ebc19aae464b88d0faf9b7d4c30d057042b582d78327e7ad3

7 years agoFix a test script problem causing shell1.test to fail with
dan [Sat, 24 Mar 2018 15:08:48 +0000 (15:08 +0000)] 
Fix a test script problem causing shell1.test to fail with
-DSQLITE_OMIT_VIRTUAL_TABLE builds.

FossilOrigin-Name: 2e06906e0959e1256fc2feb9dc2c3a9d1e9c19c4ba59585fe52df9af174ab443

7 years agoBug fix in the LEFT JOIN strength reduction optimization of
drh [Sat, 24 Mar 2018 13:24:02 +0000 (13:24 +0000)] 
Bug fix in the LEFT JOIN strength reduction optimization of
check-in [dd568c27b1d76563].  The sqlite3ExprImpliesNotNull() routine was
mistakenly assuming that a CASE expression must always be NULL if contained
any reference to a variable that was NULL.

FossilOrigin-Name: cf171abe954a5f25262161dd69f2e8cecdbf9446c3f6b298201507dbc743567e

7 years agoPrepend linkage macros to the sqlite3rebaser interfaces.
drh [Sat, 24 Mar 2018 00:19:18 +0000 (00:19 +0000)] 
Prepend linkage macros to the sqlite3rebaser interfaces.

FossilOrigin-Name: c64e8f377fe4fa321ebd04806cc27b19287e6fc3523b9988c0a70cad9fce1c18

7 years agoFix typos in sqlite3session.h preventing documentation webpages from being
dan [Fri, 23 Mar 2018 17:36:31 +0000 (17:36 +0000)] 
Fix typos in sqlite3session.h preventing documentation webpages from being
generated. Also mark all new sessions functions (those related to rebasing) as
experimental.

FossilOrigin-Name: de974235a8fefab0d08673c1b1da4e425e1d8bbfc8c35dac30943c05337b2950

7 years agoFix minor problems with passing NULL pointers to memcmp() and memcpy() found by ...
dan [Fri, 23 Mar 2018 16:31:34 +0000 (16:31 +0000)] 
Fix minor problems with passing NULL pointers to memcmp() and memcpy() found by -fsanitize=undefined.

FossilOrigin-Name: 0b06ce6d8e7cff5cd5d467a94522dfef5593d7c26663ce03c2c2b663a2641551

7 years agoFix the -readonly option on the CLI so that it actually works.
drh [Fri, 23 Mar 2018 16:08:30 +0000 (16:08 +0000)] 
Fix the -readonly option on the CLI so that it actually works.

FossilOrigin-Name: 0477fb3fd68509547f3bfd588247aac59aa4aa885ed8a21269852eda64e257ad

7 years agoAdd some more tests for the IS TRUE / IS FALSE operators.
mistachkin [Fri, 23 Mar 2018 14:56:05 +0000 (14:56 +0000)] 
Add some more tests for the IS TRUE / IS FALSE operators.

FossilOrigin-Name: 9fe5bebefe909288e583226b5dc32e0465f6b2d8eda850d01820e3f1f8091ddd

7 years agoFix typo in a comment used for documentation. No changes to code.
drh [Fri, 23 Mar 2018 14:50:51 +0000 (14:50 +0000)] 
Fix typo in a comment used for documentation.  No changes to code.

FossilOrigin-Name: 49974d3b30faaad0891a43d5e840f5dd2dc50ad6c4e6c408292de04e9e8a8868

7 years agoEnhance .schema in shell to enable matching patterns with literal underscores.
mistachkin [Fri, 23 Mar 2018 14:24:34 +0000 (14:24 +0000)] 
Enhance .schema in shell to enable matching patterns with literal underscores.

FossilOrigin-Name: 98e3f5247a6012f58642a2fcdc9be062f7afe8f2e154d06007f4935a0fd87aac

7 years agoFix an error in the CLI in the previous ([0249d9aecf69948]) check-in.
drh [Fri, 23 Mar 2018 13:18:15 +0000 (13:18 +0000)] 
Fix an error in the CLI in the previous ([0249d9aecf69948]) check-in.
Only the pattern to sqlite3_strlike() need to be escaped.

FossilOrigin-Name: 71d5f6e6322dc037a0e9089049e5d154100b2918830826e30f8043f01a287c00

7 years agoFix the ANALYZE command so that it will process tables whose names begin
drh [Fri, 23 Mar 2018 12:59:10 +0000 (12:59 +0000)] 
Fix the ANALYZE command so that it will process tables whose names begin
with "sqlite" as long as they do not being with "sqlite_".

FossilOrigin-Name: 0249d9aecf69948d9343feef9291273beef5fc98aa9a8f95b1e35cc2ce8e6cbd

7 years agoFix harmless compiler warnings seen with MSVC.
mistachkin [Fri, 23 Mar 2018 00:31:53 +0000 (00:31 +0000)] 
Fix harmless compiler warnings seen with MSVC.

FossilOrigin-Name: 2f2be1b1811e6b83fc8945da06e57b8b54233ff8a6ebd9d71b22c6bab2e74afb

7 years agoAdd APIs to the sessions module for "rebasing" changesets.
dan [Thu, 22 Mar 2018 20:35:20 +0000 (20:35 +0000)] 
Add APIs to the sessions module for "rebasing" changesets.

FossilOrigin-Name: 509506c76b7c104961826721013889d6c6b2ed9b563dcd029e0cb5cb5c34693a

7 years agoRemove some unused code from sqlite3rebaser_rebase(). sessions-rebase
dan [Thu, 22 Mar 2018 20:11:14 +0000 (20:11 +0000)] 
Remove some unused code from sqlite3rebaser_rebase().

FossilOrigin-Name: 07cc955eab0e993a75be82d58e17ca53c8abbcaf851983d235049599c19e582f

7 years agoFix another problem with rebasing updates against multiple remote changes.
dan [Thu, 22 Mar 2018 19:52:22 +0000 (19:52 +0000)] 
Fix another problem with rebasing updates against multiple remote changes.

FossilOrigin-Name: c8e7b5a061a3f2fbd9072530177b80f917b39ab5d7cd6acb0a221ab33e78a5cd

7 years agoFix an RBU problem causing errors when updating tables with default collation
dan [Thu, 22 Mar 2018 17:13:44 +0000 (17:13 +0000)] 
Fix an RBU problem causing errors when updating tables with default collation
sequences that require quoting (e.g. COLLATE "ICU_root-u-kn-on").

FossilOrigin-Name: eb4f452e354065d610ff57a6a9312ad119b6b0cc467f9dff105f0718bc27ef01

7 years agoFix a test script problem causing rbuvacuum.test to fail when run along with
dan [Thu, 22 Mar 2018 17:02:37 +0000 (17:02 +0000)] 
Fix a test script problem causing rbuvacuum.test to fail when run along with
other tests.

FossilOrigin-Name: 901cb3b6a2c8d0cc33bd34ec1dbeea49c779ae1ac3ed6733dd9826c8e0eb80c8

7 years agoAdd tests to ensure that patchsets are handled correctly by the session rebase
dan [Thu, 22 Mar 2018 14:07:36 +0000 (14:07 +0000)] 
Add tests to ensure that patchsets are handled correctly by the session rebase
APIs.

FossilOrigin-Name: 0e45baaec01947f6cbf47d5d5922a4cabe7d27181c04c0a08259c952fd023947

7 years agoAdd the left join strength reduction optimization. Enhance the push-down
drh [Thu, 22 Mar 2018 12:00:43 +0000 (12:00 +0000)] 
Add the left join strength reduction optimization.  Enhance the push-down
optimization so that it works with many LEFT JOINs.

FossilOrigin-Name: dd568c27b1d7656388ea5b4132cc0265aedd7348d265d8e8c7412b00b28a31aa

7 years agoAdd the --valid-sql option to the optfuzz test program.
drh [Thu, 22 Mar 2018 11:28:31 +0000 (11:28 +0000)] 
Add the --valid-sql option to the optfuzz test program.

FossilOrigin-Name: a8dfeec73b069f2dd7371c2792b36f152945d32120843db5361ff7e04de177bc

7 years agoRemove some unused code from the sessions module.
dan [Thu, 22 Mar 2018 11:15:59 +0000 (11:15 +0000)] 
Remove some unused code from the sessions module.

FossilOrigin-Name: a09518ab63a1ef1b7f56b9f9b16269fd83920469d4c4e179b1f68b35df4e0c4b

7 years agoGet the optfuzz program working.
drh [Wed, 21 Mar 2018 20:21:29 +0000 (20:21 +0000)] 
Get the optfuzz program working.

FossilOrigin-Name: 21346bbce9fd161e8a2037834a6e8eb443a901109ddb3a52c1b7a29000ffeac8

7 years agoMerge latest trunk changes into this branch.
dan [Wed, 21 Mar 2018 20:13:56 +0000 (20:13 +0000)] 
Merge latest trunk changes into this branch.

FossilOrigin-Name: d00b71ecf857bc6d903442d91418d5a313c584dcdd8e9c8ff3b5d940dd45bcc5

7 years agoFix some documentation and other issues with the code on this branch.
dan [Wed, 21 Mar 2018 19:46:36 +0000 (19:46 +0000)] 
Fix some documentation and other issues with the code on this branch.

FossilOrigin-Name: a9ec68627a4533ca6aa7cc1b73f864db615a80e86eda9e33660f22d269a1ba1e

7 years agoAdd the optfuzz.c program for verifying the query planner using a fuzzer.
drh [Wed, 21 Mar 2018 19:25:59 +0000 (19:25 +0000)] 
Add the optfuzz.c program for verifying the query planner using a fuzzer.
This is an initial code check-in.

FossilOrigin-Name: 3fb21251b0c9c731513e8fb137867c2710a77d99411c99348d3ac45d3babffd7

7 years agoFix rebasing of UPDATE changes against a set of remote changesets that feature
dan [Wed, 21 Mar 2018 17:29:53 +0000 (17:29 +0000)] 
Fix rebasing of UPDATE changes against a set of remote changesets that feature
both OMIT and REPLACE conflict resolution on different fields of the same row.

FossilOrigin-Name: d8bc3fdb6ba165ca8d7cab857ede8e7e6e2fac24ad59580c5e1db1a4942d295c

7 years agoRelax LEFT-JOIN restrictions on the push-down optimization. join-strength-reduction
drh [Wed, 21 Mar 2018 01:59:46 +0000 (01:59 +0000)] 
Relax LEFT-JOIN restrictions on the push-down optimization.

FossilOrigin-Name: b5d3dd8cb0b1e42ed0671a12d22af05194ea9522e4f41fd4bb0deff70b8b0757

7 years agoDo a more thorough job of cleaning erasing traces of the strength-reduced
drh [Tue, 20 Mar 2018 22:52:27 +0000 (22:52 +0000)] 
Do a more thorough job of cleaning erasing traces of the strength-reduced
LEFT JOIN.

FossilOrigin-Name: 08833dda3a25965cc509d0244d7cd68bdb2306351ca52862f347e1efe5db4508

7 years agoIf terms of the WHERE clause require that the right table in a LEFT JOIN
drh [Tue, 20 Mar 2018 21:16:15 +0000 (21:16 +0000)] 
If terms of the WHERE clause require that the right table in a LEFT JOIN
not be a null row, then simplify the LEFT JOIN into an ordinary JOIN.

FossilOrigin-Name: 5b7abecc7ab8ccbbb8cb5e0f672e67625c2555ad03442efbf34cb395f5bb71a8

7 years agoAdd further tests and documentation for the sessions rebase feature.
dan [Tue, 20 Mar 2018 20:27:03 +0000 (20:27 +0000)] 
Add further tests and documentation for the sessions rebase feature.

FossilOrigin-Name: 7475a363ebb272ae23c0796fe7587714a156dc6a3a4a57ed948ed6f69d3c1218

7 years agoFix incorrect testcase labels on two cases in join5.test. No changes to code.
drh [Tue, 20 Mar 2018 19:02:03 +0000 (19:02 +0000)] 
Fix incorrect testcase labels on two cases in join5.test.  No changes to code.

FossilOrigin-Name: 4661ac81c9589b06a07df8b7931fbd0a7f9a4e9ba1448192b70701dc85a29bd2

7 years agoImprovements to the HAVING-to-WHERE optimization. The code uses less space
drh [Tue, 20 Mar 2018 18:08:33 +0000 (18:08 +0000)] 
Improvements to the HAVING-to-WHERE optimization.  The code uses less space
and less CPU, and there is now ".selecttrace" output.

FossilOrigin-Name: 5ad668d4339397fe66fe085e0527e37a1930917da88d462a8d89a465faa15e28

7 years agoFor 'zipfile', detect attempts to cause a duplicate entry via UPDATE. Also, fix...
mistachkin [Tue, 20 Mar 2018 16:56:12 +0000 (16:56 +0000)] 
For 'zipfile', detect attempts to cause a duplicate entry via UPDATE.  Also, fix handling of 'UPDATE OR REPLACE' statements run on zipfile virtual tables.  Win32 portability fixes to the 'fileio' extension.  Miscellaneous test fixes.

FossilOrigin-Name: b36caeca91647616ac2ccdb281200c1a8bcd15d1f30dda0c1d89440d54607196

7 years agoAvoid unnecessary write to the sqlite_sequence table when an insert
drh [Tue, 20 Mar 2018 13:44:10 +0000 (13:44 +0000)] 
Avoid unnecessary write to the sqlite_sequence table when an insert
is done into an autoincrement table with an application-specified rowid
that is less than the maximum.

FossilOrigin-Name: ec7addc87f97bcff3c3694b14a680453b52de3f8c106436f0708a1cc04b90faa

7 years agoAdd the ability to disable the push-down optimization using the 0x1000 bit
drh [Tue, 20 Mar 2018 13:26:03 +0000 (13:26 +0000)] 
Add the ability to disable the push-down optimization using the 0x1000 bit
of SQLITE_TESTCTRL_OPTIMIZATIONS.  Also some documentation fixes and an
enhancement to ".eqp full" in the CLI.

FossilOrigin-Name: ae34edb7f4fa7b37a66cdf3a1d851980cb013e9abe72bdeca23e5323051e0646

7 years agoFix handling of "UPDATE OR REPLACE" statements run on zipfile virtual tables. testFixes
dan [Tue, 20 Mar 2018 13:26:01 +0000 (13:26 +0000)] 
Fix handling of "UPDATE OR REPLACE" statements run on zipfile virtual tables.

FossilOrigin-Name: 9a5ef341de2bd2fc4657a510f48159f7876f58d340b457b4272a71d389f88da3

7 years agoRemove a debugging statement accidently left in push-down-disable
drh [Tue, 20 Mar 2018 13:00:33 +0000 (13:00 +0000)] 
Remove a debugging statement accidently left in
check-in [eddc35f3057e59fd]

FossilOrigin-Name: 85a31557ac0d0401c1bf2e23a502dc2ea57d9b1bc23c01de693f5d3fe22d8341

7 years agoAdd a test case for the fix on this branch.
dan [Tue, 20 Mar 2018 12:12:06 +0000 (12:12 +0000)] 
Add a test case for the fix on this branch.

FossilOrigin-Name: 7834cf6c28c63f6ca0e29a508c0f6e3ec9c5c48715344c2db99a9866e92ef205

7 years agoIn the CLI, avoid extra .selecttrace and .wheretrace output when in ".eqp full"
drh [Tue, 20 Mar 2018 12:04:38 +0000 (12:04 +0000)] 
In the CLI, avoid extra .selecttrace and .wheretrace output when in ".eqp full"
mode.

FossilOrigin-Name: 427bbf318a28e827bf03d43c2912c8ad937dd52f829feaf7fe374093692ed61b

7 years agoCloser reading of the sqlite3_db_config() documentation show that it is
drh [Tue, 20 Mar 2018 11:58:28 +0000 (11:58 +0000)] 
Closer reading of the sqlite3_db_config() documentation show that it is
subtly incorrect.  This check-in fixes the problem.  No code changes.

FossilOrigin-Name: 44d90e7f4bc83680e8fbbf1a0423c6f5cc2cc2aed118b7af1c4c3d9e09b05dd7

7 years agoFix a minor formatting issue on the sqlite3_db_config() documentation.
drh [Tue, 20 Mar 2018 11:51:36 +0000 (11:51 +0000)] 
Fix a minor formatting issue on the sqlite3_db_config() documentation.
No changes to code.

FossilOrigin-Name: 8a439a6dda390d7486feb837f87a83e16abd283c882e81e637bd1235d2684379

7 years agoAdd the ability to disable the push-down optimization using the 0x1000 bit of
drh [Tue, 20 Mar 2018 11:24:30 +0000 (11:24 +0000)] 
Add the ability to disable the push-down optimization using the 0x1000 bit of
SQLITE_TESTCTRL_OPTIMIZATIONS.

FossilOrigin-Name: eddc35f3057e59fdc25a6911abfaa53a10cc43d8030925b65737b2f51f907421

7 years agoMinor improvements to ".selecttrace". No changes to non-debug code.
drh [Mon, 19 Mar 2018 22:28:34 +0000 (22:28 +0000)] 
Minor improvements to ".selecttrace".  No changes to non-debug code.

FossilOrigin-Name: 03e541f606ead1a13e1084db88e168278c82a2ba72b18c89baafeab3141367b4

7 years agoEnhance the command-line completion extension to return the names of
drh [Mon, 19 Mar 2018 19:05:45 +0000 (19:05 +0000)] 
Enhance the command-line completion extension to return the names of
triggers and views along with the names of tables.

FossilOrigin-Name: 10e32204e1850354ff16fc052145726e903f87185a37f172831dddad1955184e

7 years agoIn the compile_options pragma, show the actual value of the
drh [Mon, 19 Mar 2018 16:09:36 +0000 (16:09 +0000)] 
In the compile_options pragma, show the actual value of the
SQLITE_ENABLE_CEROD compile-time option, if it exists.

FossilOrigin-Name: 1ec339fd109b31e1d2b1e73345bd7a00c3d755f2c45c14d050a8203969163d60

7 years agoImproved ".selecttrace" output formatting. No changes in non-debug code.
drh [Mon, 19 Mar 2018 16:06:11 +0000 (16:06 +0000)] 
Improved ".selecttrace" output formatting.  No changes in non-debug code.

FossilOrigin-Name: 30704d2a52d37717d8b34a402c99ea32453e5c1a9840037dba96591f4acc1503

7 years agoDo not use sqlite3_column_decltype() in the CLI if it is compiled with
drh [Sat, 17 Mar 2018 16:26:36 +0000 (16:26 +0000)] 
Do not use sqlite3_column_decltype() in the CLI if it is compiled with
SQLITE_OMIT_DECLTYPE.

FossilOrigin-Name: 442e816b5fed80ebeb58c7c0ab9c2ef999bf488519bf5da670e9cec477034540

7 years agoFor 'zipfile', detect attempts to cause a duplicate entry via UPDATE.
mistachkin [Sat, 17 Mar 2018 02:13:13 +0000 (02:13 +0000)] 
For 'zipfile', detect attempts to cause a duplicate entry via UPDATE.

FossilOrigin-Name: cf78a882799424610209e9ac5e76771db3f5e6704ffa181f9598eb0986d93eb8

7 years agoAnother Win32 portability fix for the 'zipfile' tests.
mistachkin [Sat, 17 Mar 2018 00:44:29 +0000 (00:44 +0000)] 
Another Win32 portability fix for the 'zipfile' tests.

FossilOrigin-Name: 9f604418ca21472d84d754f4c3b7f170e5c2bff05e8cee86640e45b43bc53a49

7 years agoDetect corruption in the form of the sqlite_sequence table pointing to the
drh [Fri, 16 Mar 2018 23:59:36 +0000 (23:59 +0000)] 
Detect corruption in the form of the sqlite_sequence table pointing to the
wrong type of btree.

FossilOrigin-Name: 525deb7a67fbd64726c89d5cc36a54b090111e31239431efeeb2bda9836828e0

7 years agoWin32 portability fixes to the 'fileio' extension.
mistachkin [Fri, 16 Mar 2018 23:54:36 +0000 (23:54 +0000)] 
Win32 portability fixes to the 'fileio' extension.

FossilOrigin-Name: 9d2b0f8b84aac862b0572b183e3ba53ea8c0d8742aaa3c3fbe59f6036054fd1a

7 years agoEnable more 'zipfile' tests on Win32.
mistachkin [Fri, 16 Mar 2018 23:54:26 +0000 (23:54 +0000)] 
Enable more 'zipfile' tests on Win32.

FossilOrigin-Name: 49d2566c8e7d0df37494ee001fc6eae5f47f95e16f6a575f2d8d6777b62e6068

7 years agoMake a couple tests less sensitive to timing.
mistachkin [Fri, 16 Mar 2018 23:54:12 +0000 (23:54 +0000)] 
Make a couple tests less sensitive to timing.

FossilOrigin-Name: bc2af8e0aa28d8d10612ab9464c008a970348b4720bb34d0c546d341e2bc09e0

7 years agoFix a duplicate test number and cleanup a bit of Makefile whitespace.
mistachkin [Fri, 16 Mar 2018 23:53:47 +0000 (23:53 +0000)] 
Fix a duplicate test number and cleanup a bit of Makefile whitespace.

FossilOrigin-Name: 56d11c250961790579a7aeee65e83fdb29462ae37f9de93da13fbd890fc0a01d

7 years agoDetect databases whose schema is corrupted using a CREATE TABLE AS statement
drh [Fri, 16 Mar 2018 20:23:01 +0000 (20:23 +0000)] 
Detect databases whose schema is corrupted using a CREATE TABLE AS statement
and issue an appropriate error message.

FossilOrigin-Name: d75e67654aa9620b9617786553a002f54e8c6dcbbcc58948a06bd98a0916d75a

7 years agoBetter error message text when the schema is corrupted by a CREATE TABLE AS corrupt-schema
drh [Fri, 16 Mar 2018 20:15:58 +0000 (20:15 +0000)] 
Better error message text when the schema is corrupted by a CREATE TABLE AS
entry.

FossilOrigin-Name: e13993cf833423eec5f94082cee7213b2d97bcf40dddb2683cf5a8ebf50a33e3

7 years agoFix a parsing issue associated with a corrupt sqlite_master table.
mistachkin [Fri, 16 Mar 2018 19:10:05 +0000 (19:10 +0000)] 
Fix a parsing issue associated with a corrupt sqlite_master table.

FossilOrigin-Name: 5f779ff6b48ec97efacd49b1715b7e5272694fa839be349c90667812bbffe22b

7 years agoAvoid writing the sqlite_sequence table when it has not actually changed. autoinc-enhancement
drh [Fri, 16 Mar 2018 18:46:30 +0000 (18:46 +0000)] 
Avoid writing the sqlite_sequence table when it has not actually changed.

FossilOrigin-Name: 3e3849a9d1a06673e6c713a42194f5da339fbf6533fa418c38f63d09bc045867

7 years agoFix a problem with handling rebasing UPDATE changes for REPLACE conflict
dan [Fri, 16 Mar 2018 18:02:47 +0000 (18:02 +0000)] 
Fix a problem with handling rebasing UPDATE changes for REPLACE conflict
resolution.

FossilOrigin-Name: f7bf71f1d47044e3cbc74018294b8af5ad52c2bb84954e99bbd4e9b8c36fc077

7 years agoFix a problem in test script thread001.test causing a spurious "-1 files were
dan [Fri, 16 Mar 2018 07:48:43 +0000 (07:48 +0000)] 
Fix a problem in test script thread001.test causing a spurious "-1 files were
left open" error when run separately.

FossilOrigin-Name: 1774f1c3baf0bc3d83a53c52702696ff21814fa1de07cc38fd098832e6757b09

7 years agoAdd simple tests for the sessions module rebase API.
dan [Thu, 15 Mar 2018 19:25:40 +0000 (19:25 +0000)] 
Add simple tests for the sessions module rebase API.

FossilOrigin-Name: cf0d1abb44cf170d747e9c11f49ec03a29f00ab4821c613ca1e05b883a568211

7 years agoFix a typo in a comment used to generate documentation. No code changes.
drh [Thu, 15 Mar 2018 17:46:42 +0000 (17:46 +0000)] 
Fix a typo in a comment used to generate documentation.  No code changes.

FossilOrigin-Name: f1784aff4e6ff1c84d3fa0069034290154220fd2fa85c7df342c717ad54f4b91

7 years agoFix an issue with the fsdir() table-valued function not resetting correctly
drh [Thu, 15 Mar 2018 15:09:45 +0000 (15:09 +0000)] 
Fix an issue with the fsdir() table-valued function not resetting correctly
after each pass of a join.

FossilOrigin-Name: 7ce4e71c1b7251be9e922b21dfeba1f9aef6a47ce6495ecb7f94fd785ab564f2

7 years agoDraft fix for an fsdir() issue reported via the mailing list. fsDirFix
mistachkin [Thu, 15 Mar 2018 05:25:57 +0000 (05:25 +0000)] 
Draft fix for an fsdir() issue reported via the mailing list.

FossilOrigin-Name: 48641010c24bf37f13d68c4d19c5c3e9b41404af12a4947705cc53a31db04178

7 years agoAdd largely untested APIs for rebasing changesets.
dan [Wed, 14 Mar 2018 21:06:58 +0000 (21:06 +0000)] 
Add largely untested APIs for rebasing changesets.

FossilOrigin-Name: 39915b683b3f8d3bf872af1dede96bf2818b488a8638a1d248395023fc4bd0ef

7 years agoAdd the SQLITE_DBSTATUS_CACHE_SPILL option to sqlite3_db_status().
drh [Wed, 14 Mar 2018 15:25:43 +0000 (15:25 +0000)] 
Add the SQLITE_DBSTATUS_CACHE_SPILL option to sqlite3_db_status().

FossilOrigin-Name: 48a06eb02b42a021b835ff9766535805723259b9701b87fb17fa488b133cb53a

7 years agoDisable one of the test cases from check-in [21ecbce1378f3cc4] when
drh [Wed, 14 Mar 2018 15:06:42 +0000 (15:06 +0000)] 
Disable one of the test cases from check-in [21ecbce1378f3cc4] when
API_ARMOR is not enabled.

FossilOrigin-Name: 8fb23d4281915b4507e4d42a300f4b5f958ad88ad408218659c7459775d7b114

7 years agoAdd the SQLITE_DBSTATUS_CACHE_SPILL option to sqlite3_db_status() dbstatus-cache-spill
drh [Wed, 14 Mar 2018 14:53:50 +0000 (14:53 +0000)] 
Add the SQLITE_DBSTATUS_CACHE_SPILL option to sqlite3_db_status()

FossilOrigin-Name: 3faeb851374471a6f94a6fab3a62c73d03330eae6fc72cd1a277b03ad12dcdd0

7 years agoImprove detection of out-of-range parameters in sqlite3_stmt_status() for
dan [Wed, 14 Mar 2018 08:27:39 +0000 (08:27 +0000)] 
Improve detection of out-of-range parameters in sqlite3_stmt_status() for
SQLITE_ENABLE_API_ARMOR builds.

FossilOrigin-Name: 21ecbce1378f3cc4b1051628b8c1580bb807c8745a1f525bc089036af93a54af

7 years agoAdd sqlite3_changeset_apply_v2() and apply_v2_strm() to the sessions module.
dan [Tue, 13 Mar 2018 20:31:23 +0000 (20:31 +0000)] 
Add sqlite3_changeset_apply_v2() and apply_v2_strm() to the sessions module.

FossilOrigin-Name: 445bfe977d9f3a891e08ef33237862ed047fe83e134ef3ed8b47ee0f5abd8cd6

7 years agoFix a typo causing SQLITE_LOG_CACHE_SPILL builds to fail.
dan [Mon, 12 Mar 2018 21:09:16 +0000 (21:09 +0000)] 
Fix a typo causing SQLITE_LOG_CACHE_SPILL builds to fail.

FossilOrigin-Name: 0171d4a71ca7911a9fd409a42eeed0eda4521b6e48df5cd058364c0a736313b7

7 years agoAdd more tests for the profile output of the Tcl trace_v2 method.
mistachkin [Sat, 10 Mar 2018 20:45:44 +0000 (20:45 +0000)] 
Add more tests for the profile output of the Tcl trace_v2 method.

FossilOrigin-Name: 61eeb48f03f8a9a32330a5cae4387bb4e5618078cf669a5831910f99126900ec

7 years agoFix the second callback argument to the "profile" response of the
drh [Sat, 10 Mar 2018 20:25:08 +0000 (20:25 +0000)] 
Fix the second callback argument to the "profile" response of the
"trace_v2" method in the TCL interface so that it shows the actual
number of nanoseconds for the command, not the address of the variable
containing the number of nanoseconds.

FossilOrigin-Name: 8f9a12518642e5be9760956ff345fe54ed5bd3cab55328e88312278d3d78bc76

7 years agoAdd support for INSERT OR REPLACE and INSERT OR IGNORE on the zipfile
drh [Sat, 10 Mar 2018 14:17:01 +0000 (14:17 +0000)] 
Add support for INSERT OR REPLACE and INSERT OR IGNORE on the zipfile
extension.

FossilOrigin-Name: 8ad35d483e4293d5571eeacc20fd26cdc4064fbee7b63d974879d507a0ee5792

7 years agoImproved error messages from the zipfile extension.
drh [Sat, 10 Mar 2018 13:21:41 +0000 (13:21 +0000)] 
Improved error messages from the zipfile extension.

FossilOrigin-Name: f634a7e386918b829389f20c330d312315fdd61125cd2c5f66cf17a5d74bce49

7 years agoAvoid harmless left-shifts of negative numbers in the zipfile extension
drh [Sat, 10 Mar 2018 12:53:20 +0000 (12:53 +0000)] 
Avoid harmless left-shifts of negative numbers in the zipfile extension
when building ZIP archives of files with pre-DOS dates.

FossilOrigin-Name: 16bba8650cc24a0fd606944422bb31f2b8bdbe0a5a483678989e400b751eab4d