]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
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 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 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

7 years agoFix the zipfile extension so that it is able to create symbolic link entries
drh [Sat, 10 Mar 2018 12:34:08 +0000 (12:34 +0000)] 
Fix the zipfile extension so that it is able to create symbolic link entries
in the ZIP file even on systems like Win32 that do not support symbolic links
on the native filesystem.

FossilOrigin-Name: 2a4493f4ad2d09c1097e98e7086623669f3f252571884d515e51a98b1c6855e1

7 years agoFix the .archive command in the CLI so that it actually compresses content.
drh [Fri, 9 Mar 2018 22:18:53 +0000 (22:18 +0000)] 
Fix the .archive command in the CLI so that it actually compresses content.

FossilOrigin-Name: 3c2e3c2d3dd5d951099ad8d9f74d3c20dae11dd5615d86a6e2283b28ff5b19aa

7 years agoEnhance the ".ar" command in the CLI so that it is able to update and
drh [Fri, 9 Mar 2018 21:54:01 +0000 (21:54 +0000)] 
Enhance the ".ar" command in the CLI so that it is able to update and
create ZIP Archives.

FossilOrigin-Name: 9404765ef7487013f01ecf24c0a1f70040cd11e7dbb6378646d15de4e5660a40

7 years agoSetting ".stats 2" in the CLI causes column metadata for each
drh [Fri, 9 Mar 2018 16:37:05 +0000 (16:37 +0000)] 
Setting ".stats 2" in the CLI causes column metadata for each
prepared statement to be displayed.

FossilOrigin-Name: 7fea00fd96a8ab7e65734540edb907b6224659ae95d7e0504755f2610c545587

7 years agoSimplification to the shell_exec() mechanism in the CLI.
drh [Fri, 9 Mar 2018 15:24:33 +0000 (15:24 +0000)] 
Simplification to the shell_exec() mechanism in the CLI.

FossilOrigin-Name: 72e8f529ac8a268611f16456b13d55cc6c62df7f1a0aaa78a169338a0d95b960

7 years agoFix a problem in test file nockpt.test causing errors with
dan [Fri, 9 Mar 2018 14:11:36 +0000 (14:11 +0000)] 
Fix a problem in test file nockpt.test causing errors with
SQLITE_DEFAULT_AUTOVACUUM builds.

FossilOrigin-Name: e547c83f3eb71175574d4b49a0981b048bf525f57d36a2410d955cf1832bec22

7 years agoFix a test case in zipfilefault.test so that it only runs if JSON1 is
drh [Fri, 9 Mar 2018 14:06:11 +0000 (14:06 +0000)] 
Fix a test case in zipfilefault.test so that it only runs if JSON1 is
available.

FossilOrigin-Name: 072b244790893a699dc49d7a2cead85bed016f8e28d18ae7662fbeb3298cb235

7 years agoAttempt to fix a harmless compiler warning from Clang.
drh [Fri, 9 Mar 2018 12:46:34 +0000 (12:46 +0000)] 
Attempt to fix a harmless compiler warning from Clang.

FossilOrigin-Name: bba1bfbde62733e14f458bf3b71cb00d4899a4ebae2553d6ed24d48495cdced1

7 years agoEnable API armor handling for the new deserialize APIs.
mistachkin [Thu, 8 Mar 2018 19:56:52 +0000 (19:56 +0000)] 
Enable API armor handling for the new deserialize APIs.

FossilOrigin-Name: 0798c91aa9d5d347680a9d80d420224297360e03341365d48aca829cd7c423db

7 years agoAdd the --append and --zip options of the CLI to the --help message.
drh [Thu, 8 Mar 2018 18:14:41 +0000 (18:14 +0000)] 
Add the --append and --zip options of the CLI to the --help message.

FossilOrigin-Name: f010c86ecef4a1aaad986fa8ceb8230814d6c909cc28ce19e55d63f592fee9d0

7 years agoInclude the 'sessionfuzz' tool in the clean target for MSVC.
mistachkin [Thu, 8 Mar 2018 18:09:22 +0000 (18:09 +0000)] 
Include the 'sessionfuzz' tool in the clean target for MSVC.

FossilOrigin-Name: 0f5a8666b8b479bb6e470590659c1775fb9b0d6a9eee931cb48f98651cd7ffcb

7 years agoUpdates to documentation on sqlite3_serialize() and sqlite3_deserialize().
drh [Thu, 8 Mar 2018 16:36:23 +0000 (16:36 +0000)] 
Updates to documentation on sqlite3_serialize() and sqlite3_deserialize().
No changes to code.

FossilOrigin-Name: e71ceb6089695c651aaf1fa8662c5caf771ac9efc2f2e8efa0eddae6a6a389ea

7 years agoFix harmless compiler warnings in the 'dbdump' tool.
mistachkin [Wed, 7 Mar 2018 21:39:25 +0000 (21:39 +0000)] 
Fix harmless compiler warnings in the 'dbdump' tool.

FossilOrigin-Name: 2b9bb2664c56dd3280b4aad05b7f64dd23e5b992b5621a48dbfdb7c358d0f3ae

7 years agoFix harmless compiler warning.
mistachkin [Wed, 7 Mar 2018 21:29:15 +0000 (21:29 +0000)] 
Fix harmless compiler warning.

FossilOrigin-Name: 706800ba377e4a1f615ee6ab44530742f23e1d1be5b658608ca2fd352b363cb2

7 years agoEnable compilation of 'sessionfuzz' tool using MSVC.
mistachkin [Wed, 7 Mar 2018 21:13:49 +0000 (21:13 +0000)] 
Enable compilation of 'sessionfuzz' tool using MSVC.

FossilOrigin-Name: c58de43b8f2723d659fc9820caf667e215fdfa9aa2d7337fc82ba5b6f8db2e4c

7 years agoAdd the sessionfuzz test program and data obtained from a week of running
drh [Wed, 7 Mar 2018 20:48:21 +0000 (20:48 +0000)] 
Add the sessionfuzz test program and data obtained from a week of running
AFL.  Automatically run this test program on any "make test" on unix.

FossilOrigin-Name: ecaedfe596d4c05546bfd798fdca94aff6a81f55be7b17ddb65fc5547c4b5aa6

7 years agoUpdate the autoconf Makefile for MSVC.
mistachkin [Wed, 7 Mar 2018 15:54:39 +0000 (15:54 +0000)] 
Update the autoconf Makefile for MSVC.

FossilOrigin-Name: 36fec7a4a75006d860aaf3ea6707cea25c5e16f2ac05c21c27fde80f3bfeec63

7 years agoFix various compilation issues seen with MSVC.
mistachkin [Wed, 7 Mar 2018 15:19:22 +0000 (15:19 +0000)] 
Fix various compilation issues seen with MSVC.

FossilOrigin-Name: d6fa938919dbb3fe73ccdd3cbf0e9264d524ed79125f93f977a7d91c425db821

7 years agoAnother tweak to the MSVC clean target. msvcFixes
mistachkin [Wed, 7 Mar 2018 14:53:36 +0000 (14:53 +0000)] 
Another tweak to the MSVC clean target.

FossilOrigin-Name: 493abf10bf7b2ea5a4bc430bec786598776f76985ab2d99c7d5117a9a9ff632c

7 years agoFix harmless compiler warning in FTS5.
mistachkin [Wed, 7 Mar 2018 14:49:32 +0000 (14:49 +0000)] 
Fix harmless compiler warning in FTS5.

FossilOrigin-Name: 2d544711c7e9f4c2c3ca7ee7d588948d048da82e63c82f41c999fce947d6661d

7 years agoFix utility compilation issues with MSVC.
mistachkin [Wed, 7 Mar 2018 14:42:17 +0000 (14:42 +0000)] 
Fix utility compilation issues with MSVC.

FossilOrigin-Name: 5bd5a79898790bef150b2bc7f275333444b1a723385e595931377ff4d32190bf

7 years agoAdd the sqlite3_serialize() and sqlite3_deserialize() interfaces, enabled
drh [Wed, 7 Mar 2018 13:01:54 +0000 (13:01 +0000)] 
Add the sqlite3_serialize() and sqlite3_deserialize() interfaces, enabled
when the -DSQLITE_ENABLE_DESERIALIZE compile-time option is used.

FossilOrigin-Name: fc42d31d6fca21abc5377a463ed800e3066b2f3fbd2d85cb486f402d2ae7cb15

7 years agoMark an unreachable branch using NEVER(). memdb
drh [Wed, 7 Mar 2018 01:37:05 +0000 (01:37 +0000)] 
Mark an unreachable branch using NEVER().

FossilOrigin-Name: fadbc5e23f93bedd705bdc83cd3781b3821a231034bae5b942c94da77227721c

7 years agoImproved documentation for sqlite3_serialize() and sqlite3_deserialize().
drh [Tue, 6 Mar 2018 21:43:19 +0000 (21:43 +0000)] 
Improved documentation for sqlite3_serialize() and sqlite3_deserialize().
Change the name of the compile-time option to enable these interfaces
from SQLITE_ENABLE_MEMDB to SQLITE_ENABLE_DESERIALIZE.

FossilOrigin-Name: f07e97aed435b02e1473053c0257ec5c89bf0b3e46076b7a9382de432bbc2497

7 years agoHandle some boundary cases in memdb associated with OOM faults.
drh [Tue, 6 Mar 2018 20:54:27 +0000 (20:54 +0000)] 
Handle some boundary cases in memdb associated with OOM faults.

FossilOrigin-Name: b58ca4cb0c921e81efad527c80b220be120263cfdb04528ae26ecf8b8f66f44a

7 years agoSimplifications to the memdb VFS.
drh [Tue, 6 Mar 2018 19:14:32 +0000 (19:14 +0000)] 
Simplifications to the memdb VFS.

FossilOrigin-Name: 6c3f723a6856fa38ea3f11a36b56f46c5c1fcf17f4daf712e5e0b42562d5f4c6

7 years agoAvoid running a couple of tests in crash8.test that depend on the presence of
dan [Tue, 6 Mar 2018 11:46:34 +0000 (11:46 +0000)] 
Avoid running a couple of tests in crash8.test that depend on the presence of
the journal file if running on an F2FS file-system that does not require a
journal file.

FossilOrigin-Name: 797e02e0ee703ab0fd53e26ba5c96ac7429b8022522bec201423718d508acf24

7 years agoImprovements to the memdb VFS.
drh [Tue, 6 Mar 2018 04:01:08 +0000 (04:01 +0000)] 
Improvements to the memdb VFS.

FossilOrigin-Name: a14fed69d0d4932fc6c71cf8acc5199cca4efbd10bca563a8e86038d6afd5c64

7 years agoMerge the walIteratorInit() fix from trunk.
drh [Tue, 6 Mar 2018 02:00:20 +0000 (02:00 +0000)] 
Merge the walIteratorInit() fix from trunk.

FossilOrigin-Name: 6399e101d5f6b8582640e0d90783e56042eaa1600db3bd02f8df5e7b01ac1cab

7 years agoFix walIteratorInit() so that it always leaves the iterator as a NULL pointer
drh [Mon, 5 Mar 2018 23:23:28 +0000 (23:23 +0000)] 
Fix walIteratorInit() so that it always leaves the iterator as a NULL pointer
if an OOM occurs.  This fixes an assertion fault introduced by
check-in [044b0b65e716bff].

FossilOrigin-Name: e5ce256aa1f7a8ae995b79c9da895827bee5d8d0724fc15413ff203dc9e2602d

7 years agoMerge the session fix from trunk.
drh [Mon, 5 Mar 2018 21:19:57 +0000 (21:19 +0000)] 
Merge the session fix from trunk.

FossilOrigin-Name: 6274cf1f397d36be9e9b65b1935a776c834e4512e0e89f82c132efd4d1e8ef82

7 years agoFix another crash in the sessions module triggered by malformed input.
dan [Mon, 5 Mar 2018 21:17:20 +0000 (21:17 +0000)] 
Fix another crash in the sessions module triggered by malformed input.

FossilOrigin-Name: 7e70c9b86af557e86152748ddf1da467e62817b35df1da0d7d3b67941b198897

7 years agoImproved command-line help for the -A option on the CLI.
drh [Mon, 5 Mar 2018 20:21:50 +0000 (20:21 +0000)] 
Improved command-line help for the -A option on the CLI.

FossilOrigin-Name: d937ac181c5c78b9e5068db4ff1dab6becdba8c22cd27a3cfa0d4c12da1ec7ad

7 years agoA new way of doing archive commands on the command-line for the CLI. The -A
drh [Mon, 5 Mar 2018 20:20:22 +0000 (20:20 +0000)] 
A new way of doing archive commands on the command-line for the CLI.  The -A
option means that everything that follows is a ".archive" command, including
any suffix on the -A option.

FossilOrigin-Name: 9d8081fabc491ba75d26ea81b3548bd10aeeb3334b0ad1462d7ab656c8d7c35e

7 years agoIn the CLI, add a new command-line option "--archive" (also "--ar") that
drh [Mon, 5 Mar 2018 19:34:05 +0000 (19:34 +0000)] 
In the CLI, add a new command-line option "--archive" (also "--ar") that
passes all subsequent arguments to the ".archive" command.

FossilOrigin-Name: a5c4d30af1271dea2d322b0679fe963bbd0d5db6bba8904caf5e30e510d01832

7 years agoMerge session fixes from trunk.
drh [Mon, 5 Mar 2018 18:20:35 +0000 (18:20 +0000)] 
Merge session fixes from trunk.

FossilOrigin-Name: 99c02aeecf47bfa5be5ce38a7ec20818ea0f9fb960b136184e1cb6f8fb8b70e5

7 years agoIn sqlite3_checker, wrap the call to "SELECT checkfreelist()" in a
dan [Fri, 2 Mar 2018 20:00:42 +0000 (20:00 +0000)] 
In sqlite3_checker, wrap the call to "SELECT checkfreelist()" in a
transaction.

FossilOrigin-Name: 02906e55d73ea3521ad1e6807cffed5c759147f7b2d89efc4add984e53e3ad49

7 years agoIn a checkpoint, figure out if it is possible to checkpoint any frames at all
dan [Fri, 2 Mar 2018 16:52:47 +0000 (16:52 +0000)] 
In a checkpoint, figure out if it is possible to checkpoint any frames at all
before creating the wal-iterator.

FossilOrigin-Name: 044b0b65e716bffeddedbd1b0360c4c332f6d2359167c1d327a5ff96539474cb

7 years agoOptimize the obscure case of running a checkpoint against a very large wal
dan [Fri, 2 Mar 2018 15:42:20 +0000 (15:42 +0000)] 
Optimize the obscure case of running a checkpoint against a very large wal
file for which a large percentage of the frames have already been checkpointed.

FossilOrigin-Name: 0f5057dffa9be1bccab04894709d25bf1f066c4b1aef50d67ee635d46d300a4d

7 years agoAllow the zSchema argument to sqlite3_serialize() to be NULL to mean the
drh [Thu, 1 Mar 2018 22:18:26 +0000 (22:18 +0000)] 
Allow the zSchema argument to sqlite3_serialize() to be NULL to mean the
main database.

FossilOrigin-Name: 5b01b9914fb612ceece34f40d45c7eb97c3504fc5a0a5ff0e67120bdee67f6ee

7 years agoTypo fixes in comments. No changes to code.
mistachkin [Thu, 1 Mar 2018 18:09:02 +0000 (18:09 +0000)] 
Typo fixes in comments.  No changes to code.

FossilOrigin-Name: 1293d4f64f322ee57510bdff497c54e0be2c9205217e1fd96887bba1f36bec40

7 years agoFix further crashes in sqlite3changeset_apply() caused by corrupt changeset
dan [Thu, 1 Mar 2018 15:20:33 +0000 (15:20 +0000)] 
Fix further crashes in sqlite3changeset_apply() caused by corrupt changeset
blobs.

FossilOrigin-Name: 2c01c72e357296d761493aac47329f15d87afcada2b39606fc018af0e0011bb5

7 years agoMerge the latest enhancements from trunk.
drh [Thu, 1 Mar 2018 13:44:40 +0000 (13:44 +0000)] 
Merge the latest enhancements from trunk.

FossilOrigin-Name: c8083de14b54fba1071385f8530d03d5684efd4963fde0f83ddc53ae3118a75b

7 years agoFix some crashes in the sqlite3changeset_apply() function that could be caused
dan [Thu, 1 Mar 2018 12:05:51 +0000 (12:05 +0000)] 
Fix some crashes in the sqlite3changeset_apply() function that could be caused
by corrupt changeset blobs.

FossilOrigin-Name: 745a9a7fef0f28a57ea3f44899058993f6ecdedda52c81a09a4a9ce09c9004d6

7 years agoEnhance the sessions documentation to show the methods of the various objects.
drh [Wed, 28 Feb 2018 22:21:29 +0000 (22:21 +0000)] 
Enhance the sessions documentation to show the methods of the various objects.

FossilOrigin-Name: e01177754ad6d9e2d38adddddd2e2e212094dac1154bda5fcee61ca8b678ae0f

7 years agoUse <pre> around code snippets in the documentation for sessions
drh [Wed, 28 Feb 2018 21:50:00 +0000 (21:50 +0000)] 
Use <pre> around code snippets in the documentation for sessions
interfaces.  This is a documentation change only with no changes to code.

FossilOrigin-Name: c949b915e893e917315ce21092d4c4bbd3e1b88d5326928f71dcc2f18f300702

7 years agoFix a potential NULL pointer deref following OOM in the new IS TRUE
drh [Wed, 28 Feb 2018 04:30:55 +0000 (04:30 +0000)] 
Fix a potential NULL pointer deref following OOM in the new IS TRUE
logic.

FossilOrigin-Name: 48775ec693c21927ff26448acc614dd67d56240fa263499da2a9fe405c546c32

7 years agoAdd support for TRUE and FALSE keywords and for operators IS TRUE, IS FALSE,
drh [Tue, 27 Feb 2018 15:40:59 +0000 (15:40 +0000)] 
Add support for TRUE and FALSE keywords and for operators IS TRUE, IS FALSE,
IS NOT TRUE, and IS NOT FALSE.  If there is are columns named TRUE or FALSE,
then the keywords resolve to the column names, for compatibility.  The
behavior of the "DEFAULT true" phrase is changed to mean what it says,
rather than being an alias for "DEFAULT 'true'".

FossilOrigin-Name: 9a7f02c50e6c8a3dc3addf4e51b7e04bd31670d6ce58d26d55273c43b5ecc8b0

7 years agoClean up comments and variable names prior to merge. is-true-operator
drh [Tue, 27 Feb 2018 14:49:25 +0000 (14:49 +0000)] 
Clean up comments and variable names prior to merge.

FossilOrigin-Name: 6445519e91c4f98b4a9a45d5091d733c31497ebf0eb23a76edce3091f626035d

7 years agoRemove an unnecessary decision.
drh [Tue, 27 Feb 2018 00:58:13 +0000 (00:58 +0000)] 
Remove an unnecessary decision.

FossilOrigin-Name: adcb4665490404e8da2de128dd5df9aeed8e08893649dedb6788ebb5d957b400

7 years agoCode simplifications. New test cases.
drh [Mon, 26 Feb 2018 21:26:27 +0000 (21:26 +0000)] 
Code simplifications.  New test cases.

FossilOrigin-Name: 57508518ef9d003d259ba98dcc32e5104aca26731a7161808741fe10bc0830d0

7 years agoGet the "DEFAULT true" and "DEFAULT false" phrases working correctly in
drh [Mon, 26 Feb 2018 20:15:54 +0000 (20:15 +0000)] 
Get the "DEFAULT true" and "DEFAULT false" phrases working correctly in
CREATE TABLE.

FossilOrigin-Name: 8002f87d96b3f885cd208e7d204907a33ba60c4057ce2338b71e2de41215b0e5

7 years agoEnhance TreeView so that it can display the new IS TRUE expression trees.
drh [Mon, 26 Feb 2018 19:03:25 +0000 (19:03 +0000)] 
Enhance TreeView so that it can display the new IS TRUE expression trees.

FossilOrigin-Name: 7e38305e6f71c3353df3d11d099e255eefbacceafd7ed2ccaba257fe2e7b8c38

7 years agoRefactor for correct NULL handling in the IS TRUE, IS FALSE, IS NOT TRUE,
drh [Mon, 26 Feb 2018 18:49:05 +0000 (18:49 +0000)] 
Refactor for correct NULL handling in the IS TRUE, IS FALSE, IS NOT TRUE,
and IS NOT FALSE operators.

FossilOrigin-Name: cf2abd59be9971a55bd3d6c5df374c6aaa23bf81819482b42f01ee2484dcd739

7 years agoMore tests pursuant to ticket [36fae083b450e3af857a459e20].
mistachkin [Mon, 26 Feb 2018 17:03:03 +0000 (17:03 +0000)] 
More tests pursuant to ticket [36fae083b450e3af857a459e20].

FossilOrigin-Name: c26f236da61aef7c7a8fe38f1c7f33eea894c8fae38de6a085d4cce933a70502

7 years agoFix heap issue in the shell on Win32 caused by allocator mismatch.
mistachkin [Mon, 26 Feb 2018 16:49:20 +0000 (16:49 +0000)] 
Fix heap issue in the shell on Win32 caused by allocator mismatch.

FossilOrigin-Name: 7b3a75519aa72a6b49a125ee84946ba2c0722dd6644ee0c80ba567eb85daf5c9

7 years agoMerge the fix for determining truth of floating point values from trunk.
drh [Mon, 26 Feb 2018 15:31:39 +0000 (15:31 +0000)] 
Merge the fix for determining truth of floating point values from trunk.

FossilOrigin-Name: 003dc140536d0dd4384252ae1b82827b5d8b2b399520f99549b9266a482009fb

7 years agoAlways interpret non-zero floating-point values as true even if their
drh [Mon, 26 Feb 2018 15:27:31 +0000 (15:27 +0000)] 
Always interpret non-zero floating-point values as true even if their
integer part is zero.  Fix for ticket [36fae083b450e3af857a459e20].

FossilOrigin-Name: a983fa857048c748112c2f805f13aadeae43b43b3d27fa55433a3699b51c9a0e

7 years agoExperimental implementation of IS TRUE and IS FALSE operators. All TRUE and
drh [Mon, 26 Feb 2018 03:20:18 +0000 (03:20 +0000)] 
Experimental implementation of IS TRUE and IS FALSE operators.  All TRUE and
FALSE to act like constants if the names do not resolve to a column name.

FossilOrigin-Name: 40314bc999af08ab10e654241208842b4bb95b19858d11249444372250ea4160

7 years agoFix harmless compiler warnings in the zipfile extension seen with MSVC.
mistachkin [Fri, 23 Feb 2018 13:38:54 +0000 (13:38 +0000)] 
Fix harmless compiler warnings in the zipfile extension seen with MSVC.

FossilOrigin-Name: 15c587cf6ffc920dc37f67cacb4f0db6a603fb998a22a639f755387910516414

7 years agoEnable the JSON1 extension when compiling the test fixture with MSVC.
mistachkin [Fri, 23 Feb 2018 13:38:20 +0000 (13:38 +0000)] 
Enable the JSON1 extension when compiling the test fixture with MSVC.

FossilOrigin-Name: e9e9f27b3d496531905ad7459cf60366ad3798f507266134dd6388cdec50fdc4

7 years agoFor the "SQLite archive" link in the README.md file, point to the
drh [Thu, 22 Feb 2018 18:30:53 +0000 (18:30 +0000)] 
For the "SQLite archive" link in the README.md file, point to the
CLI .archive command documentation, not the original "sqlar" website.

FossilOrigin-Name: 4290faf5f7223ebe35b8ed5c4f0ba2444c1764501cabc09a79000f9c1d0890c7

7 years agoUpdates to the README.md file. Mention the ability to use SQLite-archives for
drh [Thu, 22 Feb 2018 18:28:19 +0000 (18:28 +0000)] 
Updates to the README.md file.  Mention the ability to use SQLite-archives for
download.

FossilOrigin-Name: ab9a7ae4eec0aaa5e0b472998f6de7212055d93c163f0b66da60b956bcc45add

7 years agoRemove an unreachable branch in the walIndexPage() logic.
drh [Wed, 21 Feb 2018 01:48:22 +0000 (01:48 +0000)] 
Remove an unreachable branch in the walIndexPage() logic.

FossilOrigin-Name: 4e61a9731f5949dcf05c541106b56be16add04a7730613481fc8519d3e4f493b

7 years agoSmall performance improvement in sqltie3WalFindFrame().
drh [Wed, 21 Feb 2018 01:05:37 +0000 (01:05 +0000)] 
Small performance improvement in sqltie3WalFindFrame().

FossilOrigin-Name: 52013cad0e6ce2d694f25e2984a76d438cef724f0e07c8bb9d3dce8a3caf4350

7 years agoRemove an unnecessary memset().
drh [Wed, 21 Feb 2018 00:48:02 +0000 (00:48 +0000)] 
Remove an unnecessary memset().

FossilOrigin-Name: e7b7f5884a78630c6ba6a217c36247397e62f1928d4b480df929efcfc4a01893

7 years agoMake the walIndexPage() routine about 3x faster by factoring out the seldom
drh [Tue, 20 Feb 2018 22:20:57 +0000 (22:20 +0000)] 
Make the walIndexPage() routine about 3x faster by factoring out the seldom
used reallocation logic into a separate subroutine.

FossilOrigin-Name: e2b107141cd97bd4ab240748a9ce43fc2ec950ea74610697a4a7a3d7a6441e6b

7 years agoIn the speed-check.sh script, make WAL mode the default. Add the --legacy
drh [Tue, 20 Feb 2018 17:02:31 +0000 (17:02 +0000)] 
In the speed-check.sh script, make WAL mode the default.  Add the --legacy
option to do DELETE mode.  Continue to use DELETE mode for long-term performance
graphs since WAL mode was not always available, but use WAL mode for
day-to-day performance measurements.

FossilOrigin-Name: cd81613850c0458b4b5b2460b9b38ce7ff6e557f7add9615058bb96f5a344ccd

7 years agoRemove a superfluous "#if 1". No logic changes.
drh [Tue, 20 Feb 2018 16:39:11 +0000 (16:39 +0000)] 
Remove a superfluous "#if 1".  No logic changes.

FossilOrigin-Name: caaffd32001ff44c31f2d6dbe921f9d294f869c2c4a81e943fdf3f43f8d9313c

7 years agoOptimize calls to sqlite3_mprintf("%z...") so that they attempt to append
drh [Tue, 20 Feb 2018 15:23:37 +0000 (15:23 +0000)] 
Optimize calls to sqlite3_mprintf("%z...") so that they attempt to append
text onto the end of the existing memory allocation rather than reallocating
and copying.

FossilOrigin-Name: 4bc8a48e644562f6e6192f4c6fc4a70f6bb59f8126ed6c6dc876bedf65d74cda

7 years agoRemove a lot of the text describing extended format options from the
drh [Tue, 20 Feb 2018 13:46:20 +0000 (13:46 +0000)] 
Remove a lot of the text describing extended format options from the
documentation on sqlite3_mprintf() and friends, since that information is
now covered by the separate printf.html document.  Provide links to that
other document.  No changes to code.

FossilOrigin-Name: 99eec556f065ad19548e48d1f4ae0a3767b4e82e1c83fa2365062e3c5e0071fb

7 years agoEnhance the string formatter (used by printf()) so that the width and
drh [Mon, 19 Feb 2018 22:46:19 +0000 (22:46 +0000)] 
Enhance the string formatter (used by printf()) so that the width and
precision of string substitution operators refer to characters instead of
bytes when the alternate-form-2 flag ("!") is used.  Also fix the %c
substition to always work within unicode, regardless of the
alternate-form-2 flag.

FossilOrigin-Name: c883c4d33f4cd722982aca17eeb355d19eeed793991d923b5494d173b1d0c73a

7 years agoPrinting a value of 0 using %c terminates the string. printf-enhancement
drh [Mon, 19 Feb 2018 21:58:16 +0000 (21:58 +0000)] 
Printing a value of 0 using %c terminates the string.

FossilOrigin-Name: 255612f0a131f2f522cbca3cc5a1edcf7e38938abca25ba421e7e38a422db9c9

7 years agoMore test cases for unicode handling in printf.
drh [Mon, 19 Feb 2018 20:41:01 +0000 (20:41 +0000)] 
More test cases for unicode handling in printf.

FossilOrigin-Name: ac188211119bfd77f43e4aba8acab733a56aac90b4c8a11f7ef8e6388582438f

7 years agoTest cases and a bug fix on the new unicode handling in %c.
drh [Mon, 19 Feb 2018 20:23:20 +0000 (20:23 +0000)] 
Test cases and a bug fix on the new unicode handling in %c.

FossilOrigin-Name: e41d64e95b9b6fec5dc329553822925e7d648a41912b420cfa1ba198736e6bab

7 years agoFix the %c substitution in printf() so that it works with unicode characters.
drh [Mon, 19 Feb 2018 18:56:52 +0000 (18:56 +0000)] 
Fix the %c substitution in printf() so that it works with unicode characters.

FossilOrigin-Name: c35be1d9e9132fbadc74d207c1088e5a710a151c0835c38a63bf3c8e6fd711a0

7 years agoMake the alternate-form-2 flag ("!") change the meaning of width and precision
drh [Mon, 19 Feb 2018 18:03:10 +0000 (18:03 +0000)] 
Make the alternate-form-2 flag ("!") change the meaning of width and precision
from bytes to characters for the %q, %Q, and %w extensions of printf().

FossilOrigin-Name: 391540acbea34eb88c75b1152b458d8936b3fdfff47633b9ec897775b015ba4c

7 years agoIn the printf() library, measure width and precision in characters rather
drh [Mon, 19 Feb 2018 17:03:23 +0000 (17:03 +0000)] 
In the printf() library, measure width and precision in characters rather
than bytes if the "!" (alternate-form-2) flag is present on a %s or %z
substitution.

FossilOrigin-Name: ca31c6630422fca70e626dd38aae96296bd8535d491ca52391624a5e7e663636

7 years agoOnly try to use the geteuid() interface on unix if HAVE_FCHOWN is defined.
drh [Mon, 19 Feb 2018 16:34:31 +0000 (16:34 +0000)] 
Only try to use the geteuid() interface on unix if HAVE_FCHOWN is defined.
This fixes the build for vxWorks, we are told.

FossilOrigin-Name: 38f654dc117bb11d61407327884b5c913cfaf920547bebc4ce5a4cf983e5c20e

7 years agoFix an assert so that it compares two CellInfo objects field by field
drh [Mon, 19 Feb 2018 13:53:56 +0000 (13:53 +0000)] 
Fix an assert so that it compares two CellInfo objects field by field
instead of using memcmp().  Memcmp() does not work on x86
because of uninitialized padding bytes.

FossilOrigin-Name: 88258770adead70fa101c74e266a37bb9aaffac0ba738a4b345617feb8c46477

7 years agoFix a memory leak in the processing of nested row values. This problem has
drh [Sun, 18 Feb 2018 17:50:03 +0000 (17:50 +0000)] 
Fix a memory leak in the processing of nested row values.  This problem has
existed every since row values support was added (version 3.15.0, 2016-10-14)
but was only just now detected by OSSFuzz.

FossilOrigin-Name: 2df6bbf1b8ca881c8a465d6624de66fde4c5975ccae6b2f2dda392b137f577de

7 years agoPort mutex enhancments from check-in [f53b8a573b] to the Win32 implementation.
mistachkin [Sun, 18 Feb 2018 00:54:06 +0000 (00:54 +0000)] 
Port mutex enhancments from check-in [f53b8a573b] to the Win32 implementation.

FossilOrigin-Name: 74bb7225d132c80fd5758bb8c120448e3b3e951d0ca2fa0c57cac0a9c6c27045

7 years agoFix a data race causing a tsan complaint with SQLITE_ENABLE_API_ARMOR builds
dan [Sat, 17 Feb 2018 07:38:50 +0000 (07:38 +0000)] 
Fix a data race causing a tsan complaint with SQLITE_ENABLE_API_ARMOR builds
on unix. The race condition is not dangerous in practice, it just upsets tsan.

FossilOrigin-Name: f53b8a573bfbb48780243d56ca8372165adb1b979731c43d46cd1f8eb7e593f3

7 years agoDo not allow parameters or schema references inside of WITH clause of
drh [Thu, 15 Feb 2018 21:00:37 +0000 (21:00 +0000)] 
Do not allow parameters or schema references inside of WITH clause of
triggers and views.  This fixes a bug discovered by OSSFuzz and present
since common-table-expressions were first added in 2014-02-03.

FossilOrigin-Name: b918d4b4e546d3903ff20efc3c8ca26dd9761cc8ed9ef7d2799b66ff9ae1ae51

7 years agoImprove performance of editdist3() by keeping the costs in sorted order.
drh [Thu, 15 Feb 2018 03:56:33 +0000 (03:56 +0000)] 
Improve performance of editdist3() by keeping the costs in sorted order.
Also add a new regression test to editdist3().

FossilOrigin-Name: dc734c5b61464dfd6bfa7963f2ecce32e405a0c2ba1ef6f453ec9389da080256

7 years agoReduce the number of calls to strncmp() required to run editDist3Core().
drh [Thu, 15 Feb 2018 03:05:56 +0000 (03:05 +0000)] 
Reduce the number of calls to strncmp() required to run editDist3Core().

FossilOrigin-Name: afd6fbc01052ccfc9bd29fb8f934b291b8f56af44fcae870da7e1355fe95c29a

7 years agoFix the --heap, --pagecache, --lookaside and other options to the command-line
drh [Thu, 15 Feb 2018 01:03:37 +0000 (01:03 +0000)] 
Fix the --heap, --pagecache, --lookaside and other options to the command-line
shell that invoke sqlite3_config() so that they work again.

FossilOrigin-Name: 00707f2f2f746a6421f3e2de995e68cc8adba7225a04db6b28db52944e7e988e

7 years agoAdd the --readonly option to the ".open" command in the CLI.
drh [Wed, 14 Feb 2018 23:27:43 +0000 (23:27 +0000)] 
Add the --readonly option to the ".open" command in the CLI.

FossilOrigin-Name: 06870bb15656b50b0e14d4364bb21afac76500e313ecf67aaef3688d603fd076

7 years agoPerformance optimizations to the editdist3() function in the spellfix
drh [Wed, 14 Feb 2018 20:58:36 +0000 (20:58 +0000)] 
Performance optimizations to the editdist3() function in the spellfix
extension.

FossilOrigin-Name: 70d304dcbac4c3fd5e3b96108bffea2ce6c0db19c847397d5c5e268bb90a981d