]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
7 years agoDisable the OR optimization based on expressions in the ON clause of a begin-concurrent-pnu-tempfix
drh [Mon, 23 Apr 2018 19:30:04 +0000 (19:30 +0000)] 
Disable the OR optimization based on expressions in the ON clause of a
LEFT JOIN.  This is a temporary measure until we can devise a better fix.

FossilOrigin-Name: 4df5ea935efe2ed8056c1fc12f446c91b47fa72a3e79fbaf669b5e6b4e295304

7 years agoMerge all recent trunk enchancements, and especially the autoincrement
drh [Tue, 20 Mar 2018 14:00:25 +0000 (14:00 +0000)] 
Merge all recent trunk enchancements, and especially the autoincrement
write reduction fix.

FossilOrigin-Name: 257900494f9aac7e4181b65d0eddc9cf2e9a52dc794ad68284f085d1c402addb

7 years agoRemove debugging puts from concurrrent3.test.
drh [Tue, 20 Mar 2018 13:54:22 +0000 (13:54 +0000)] 
Remove debugging puts from concurrrent3.test.

FossilOrigin-Name: 13b4975681f249831a22562d1c26958f841ea77ca779858b0bee735dd30b710e

7 years agoMerge all recent enhancements from trunk.
drh [Tue, 20 Mar 2018 13:52:42 +0000 (13:52 +0000)] 
Merge all recent enhancements from trunk.

FossilOrigin-Name: b0c2f760a637ee973f4dcc27308eec44950e6d0a9c5ab5c828c1210c1f868efa

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 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 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 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 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 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 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 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 agoMerge latest changes from begin-concurrent into this branch.
dan [Fri, 2 Mar 2018 18:26:50 +0000 (18:26 +0000)] 
Merge latest changes from begin-concurrent into this branch.

FossilOrigin-Name: 8ade94ba6712827c672ddad8436f8b97cc520ced122e7d0043ad3c3ba94f1ed6

7 years agoUpdate this branch with recent checkpoint related changes from trunk.
dan [Fri, 2 Mar 2018 17:59:37 +0000 (17:59 +0000)] 
Update this branch with recent checkpoint related changes from trunk.

FossilOrigin-Name: fb6b7938601505186c0b1f0df6c45630039027f85ff394d290bc2c86b16a3a07

7 years agoMerge latest trunk changes into this branch.
dan [Fri, 2 Mar 2018 17:40:23 +0000 (17:40 +0000)] 
Merge latest trunk changes into this branch.

FossilOrigin-Name: 36801effa9ec67b551f58972e21794466420f10cd0420701fcd87695e6cd11ee

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