]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
5 years agoFix a harmless compiler warning. decimal
drh [Tue, 23 Jun 2020 15:29:22 +0000 (15:29 +0000)] 
Fix a harmless compiler warning.

FossilOrigin-Name: e1416c8b0628afa062d8cff40d0cd3576dc85460e55b21a271f88fcb608b9f59

5 years agoAvoid unnecessary normalization in decimal_sum(). Trim excess trailing
drh [Tue, 23 Jun 2020 14:44:57 +0000 (14:44 +0000)] 
Avoid unnecessary normalization in decimal_sum().  Trim excess trailing
zeros off the result of decimal_mul().

FossilOrigin-Name: 0294ce071c863eb517e97beff31c3d95a4370e979a969415162302a90d3fda0e

5 years agoAdd the decimal_mul() function.
drh [Mon, 22 Jun 2020 21:25:37 +0000 (21:25 +0000)] 
Add the decimal_mul() function.

FossilOrigin-Name: 72eee04b67268ad38fd51ff32849f08c0a54cf1b481d5ecb11d77cc9c729ee03

5 years agoAn extension for doing decimal arithmetic on strings.
drh [Mon, 22 Jun 2020 19:12:23 +0000 (19:12 +0000)] 
An extension for doing decimal arithmetic on strings.

FossilOrigin-Name: 4c3b85607feb53462ccc8b89bea699fdb132c402eae597afa33cc40a85c32329

5 years agoWork around a bug (an incorrect warning) in Clang-8.
drh [Sat, 20 Jun 2020 03:43:46 +0000 (03:43 +0000)] 
Work around a bug (an incorrect warning) in Clang-8.

FossilOrigin-Name: 067291143a63db924ead4810defb4bc6f195557412f5d1c22299f30d2d9f2a79

5 years agoReverse unintentional spacing change in the previous check-in.
mistachkin [Fri, 19 Jun 2020 15:35:07 +0000 (15:35 +0000)] 
Reverse unintentional spacing change in the previous check-in.

FossilOrigin-Name: c7b2ee1edb108430454578c1623ba6aee1e2a7bc30cb2f9884ea3e21c3b75635

5 years agoInclude 'sqlite3rc.h' in the amalgamation archive targets.
mistachkin [Fri, 19 Jun 2020 15:33:23 +0000 (15:33 +0000)] 
Include 'sqlite3rc.h' in the amalgamation archive targets.

FossilOrigin-Name: 3df579ca32e8250725957d1982897a43281c73e8373af49abd6e7bd674f30e74

5 years agoExtend the refactoring into extensions. Clean up stray newlines.
drh [Fri, 19 Jun 2020 15:24:12 +0000 (15:24 +0000)] 
Extend the refactoring into extensions.  Clean up stray newlines.

FossilOrigin-Name: 7a876209a678a34c198b54ceef9e3c041f128a14dc73357f6a57cadadaa6cf7b

5 years agoFurther refactoring of the schema table name.
drh [Fri, 19 Jun 2020 13:33:53 +0000 (13:33 +0000)] 
Further refactoring of the schema table name.

FossilOrigin-Name: 9536fa0ae0c1ae6e2e98d2fa11e5acda7f3c9b8ca5061b6f7f8cae63a11d936b

5 years agoRefactoring various names. No changes in the resulting machine code.
drh [Fri, 19 Jun 2020 11:34:57 +0000 (11:34 +0000)] 
Refactoring various names.  No changes in the resulting machine code.

FossilOrigin-Name: 7bb08b1bfcf184e4b59c8c9028926a0052612ff6a6731914ccdb8dee07ea4a98

5 years agoFix an assert() that could fail when operating on a database with a corrupt schema.
dan [Wed, 17 Jun 2020 20:29:56 +0000 (20:29 +0000)] 
Fix an assert() that could fail when operating on a database with a corrupt schema.

FossilOrigin-Name: 4a340c9bc7d939efc947e3b17ca79314482f74368b15567dd089d40e4270890e

5 years agoFix an assert() in fts3 that could fail when processing a corrupt record.
dan [Wed, 17 Jun 2020 14:54:06 +0000 (14:54 +0000)] 
Fix an assert() in fts3 that could fail when processing a corrupt record.

FossilOrigin-Name: 4adc0a1b0d84c2df6d6bf0d5d9d3fa9f7d048af8d232c4beb77518727890f212

5 years agoFix a problem with retrying constraint failures within sqlite3changeset_apply() calls...
dan [Wed, 17 Jun 2020 14:14:11 +0000 (14:14 +0000)] 
Fix a problem with retrying constraint failures within sqlite3changeset_apply() calls with the SQLITE_CHANGESET_INVERT flag is set.

FossilOrigin-Name: d73e857b833dfc29400049ca7f01ca465f980466e3aa67214c3c5e5573181419

5 years agoAdd new file doc/wal-lock.md, containing notes on wal-mode blocking locks.
dan [Tue, 16 Jun 2020 19:51:56 +0000 (19:51 +0000)] 
Add new file doc/wal-lock.md, containing notes on wal-mode blocking locks.

FossilOrigin-Name: c6b1d3a385751633d3ac1853e13d5e847185dd6432fb8b960a4080f61357c08c

5 years agoIn the CLI, only interrupt tabular outputs at the end of a line. And print
drh [Tue, 16 Jun 2020 17:34:40 +0000 (17:34 +0000)] 
In the CLI, only interrupt tabular outputs at the end of a line.  And print
"Interrupt" on a line after stopping the output.

FossilOrigin-Name: f3bd689336fecaa1e2928b826c6aedb0178d322f4633ac429dd1ae6fbc08e7f1

5 years agoAdd a test case covering the previous check-in to the test/fuzzdata8.db file.
drh [Tue, 16 Jun 2020 14:12:43 +0000 (14:12 +0000)] 
Add a test case covering the previous check-in to the test/fuzzdata8.db file.

FossilOrigin-Name: 95379da0e1ad5110648a5b3af24e7caab66a6f1ad6efdf374c83ae4ef1fed515

5 years agoFix an assert() in fts3 that can fail when processing a corrupt record.
dan [Tue, 16 Jun 2020 14:06:20 +0000 (14:06 +0000)] 
Fix an assert() in fts3 that can fail when processing a corrupt record.

FossilOrigin-Name: a58a6d6fb241a50c4c7c9af8a9c65bc4746e905b2ae12290c7182afa944053a2

5 years agoProvide "sqlite_schema" as an alternative name to the table that holds the
drh [Mon, 15 Jun 2020 20:27:35 +0000 (20:27 +0000)] 
Provide "sqlite_schema" as an alternative name to the table that holds the
database schema.

FossilOrigin-Name: 61782a7ae3c25cf59d7a676cb295eb024d17c46e532ae78c6fe871a91d712fa9

5 years agoFix the CLI so that interrupts work in columnar output mode.
drh [Mon, 15 Jun 2020 20:05:37 +0000 (20:05 +0000)] 
Fix the CLI so that interrupts work in columnar output mode.

FossilOrigin-Name: 9472f1fe58222b738ad10fc93ceb365dc33b65c2bbca571f52bcd5bdb74b347e

5 years agoFix the --enable-update-limit option to ./configure.
drh [Mon, 15 Jun 2020 14:38:57 +0000 (14:38 +0000)] 
Fix the --enable-update-limit option to ./configure.

FossilOrigin-Name: d31fd57ea538668238787fde10a6a57bbd8a428c73f2e54b2e95ee9a645bc75b

5 years agoFix a defect in the query-flattener optimization identified by
drh [Mon, 15 Jun 2020 13:51:34 +0000 (13:51 +0000)] 
Fix a defect in the query-flattener optimization identified by
ticket [8f157e8010b22af0].

FossilOrigin-Name: 10fa79d00f8091e5748c245f4cae5b5f499a5f8db20da741c130e05a21ede443

5 years agoCheck-in [1d4f86201dab9a22] changed a testcase() to an assert() because we
drh [Sun, 14 Jun 2020 13:40:13 +0000 (13:40 +0000)] 
Check-in [1d4f86201dab9a22] changed a testcase() to an assert() because we
didn't know how to reach that condition any more.  But YongHeng's fuzzer
found a way.  So now we change it back.  Ticket [9fb26d37cefaba40].

FossilOrigin-Name: 90b1169d1b200d35a3f9f0ad2ae35a1b336bdd9b1ad0494ba80a382354c8d8b8

5 years agoAvoid deleting expression nodes in the flattener code, as they may be referenced...
dan [Sat, 13 Jun 2020 21:24:40 +0000 (21:24 +0000)] 
Avoid deleting expression nodes in the flattener code, as they may be referenced by AggInfo objects further up the stack.

FossilOrigin-Name: cc1fffdeddf422404170fa163ab80372ae58b444d7012b2c164021b221709b3e

5 years agoIdentifiers "TRUE" and "FALSE" cannot take on their boolean constant values if
drh [Sat, 13 Jun 2020 03:18:21 +0000 (03:18 +0000)] 
Identifiers "TRUE" and "FALSE" cannot take on their boolean constant values if
they are operands of the "." operator.

FossilOrigin-Name: ad738286e2441b5e84d05366db3fcafabe66be766f21fe6c17f43a8fabab16fb

5 years agoNew test case added to test/fuzzdata8.db.
drh [Fri, 12 Jun 2020 15:45:02 +0000 (15:45 +0000)] 
New test case added to test/fuzzdata8.db.

FossilOrigin-Name: 14a5cbddc887e23a684fabab1a213cce261bd6cffa0663d4f138b92d0b65b9c2

5 years agoFix a buffer overread in fts3 that could occur when decoding a corrupted record.
dan [Fri, 12 Jun 2020 15:17:27 +0000 (15:17 +0000)] 
Fix a buffer overread in fts3 that could occur when decoding a corrupted record.

FossilOrigin-Name: 9a4a40c45feb2bb89020dc7711b4753479112ceae7ce2a44521d72afeddfac83

5 years agoRemove a NEVER() that turns out to be reachable.
drh [Fri, 12 Jun 2020 00:31:52 +0000 (00:31 +0000)] 
Remove a NEVER() that turns out to be reachable.

FossilOrigin-Name: 44e573ecd5c2b60107133d60c51f3a04a3f904e9c1cf926e9b8ea977c7acae8d

5 years agoAdd a new assert() to the SELECT processing.
drh [Thu, 11 Jun 2020 16:04:10 +0000 (16:04 +0000)] 
Add a new assert() to the SELECT processing.

FossilOrigin-Name: 98cea4a32ba558c137d71a5e373a6803d764d34c5640907371dcf6468ffb2e64

5 years agoAvoid rewriting compound SELECT statements that use a different collation sequence...
dan [Thu, 11 Jun 2020 15:53:54 +0000 (15:53 +0000)] 
Avoid rewriting compound SELECT statements that use a different collation sequence for ORDER BY and record processing a second time if they contain window functions. Fix for [b706351c].

FossilOrigin-Name: 32a88bdd4be5acdc1b80856bf6e32724dc3a467d5050bec0fe1a3dfedcc06f34

5 years agoProvide the ability to use the SELECTTRACE() debugging macro outside of the
drh [Thu, 11 Jun 2020 00:57:09 +0000 (00:57 +0000)] 
Provide the ability to use the SELECTTRACE() debugging macro outside of the
select.c source file.  Use this to add a new SELECTTRACE() entry in
window.c for improved tracing of window-function parse-tree rewriting.

FossilOrigin-Name: 30c6d895b573d5f2a53487b3b7a0d20be7e382c7a0bc87336bd43fbd2fa89bf4

5 years agoMake sure the bbox object is fully initialized in geopoly, even if reading
drh [Wed, 10 Jun 2020 14:30:15 +0000 (14:30 +0000)] 
Make sure the bbox object is fully initialized in geopoly, even if reading
a corrupted database.

FossilOrigin-Name: fd5abb1a7b5a55127d5c0d5ff448020d8bccab44e4f5afe1eb88fc19578af735

5 years agoEnsure that the "push-down" optimization does not push constraints down into compound...
dan [Wed, 10 Jun 2020 10:58:15 +0000 (10:58 +0000)] 
Ensure that the "push-down" optimization does not push constraints down into compound queries if any of the component queries uses window functions.

FossilOrigin-Name: 094dcfe779613301521e8bb990432df187b3686add75a3420b4a193f02f3467f

5 years agoDisable AggInfo consistency checks when unwinding after an OOM.
drh [Wed, 10 Jun 2020 03:07:26 +0000 (03:07 +0000)] 
Disable AggInfo consistency checks when unwinding after an OOM.

FossilOrigin-Name: 65179814aa0ae5927bae97c10ef20f290535399b889d96d5b88931f62635f212

5 years agoEnsure that aggregate functions that (a) are part of SELECT statements with
drh [Tue, 9 Jun 2020 23:50:13 +0000 (23:50 +0000)] 
Ensure that aggregate functions that (a) are part of SELECT statements with
no FROM clause and (b) have one or more scalar sub-selects as arguments are
assigned to the correct aggregate context.
Fix for ticket [7c6d876f84e6e7e2]

FossilOrigin-Name: c29a9e484e1dd245962afbbf511b183462af5e86c511261ccf018345e773f940

5 years agoMark an always-true conditional with ALWAYS(). agg-context-fix
drh [Tue, 9 Jun 2020 22:11:06 +0000 (22:11 +0000)] 
Mark an always-true conditional with ALWAYS().

FossilOrigin-Name: 35a236841764a10cdcda63f34e1a8e7ffa43933bc89cb32f675454327834d7bf

5 years agoEnsure that aggregate functions that (a) are part of SELECT statements with no FROM...
dan [Tue, 9 Jun 2020 17:45:48 +0000 (17:45 +0000)] 
Ensure that aggregate functions that (a) are part of SELECT statements with no FROM clause and (b) have one or more scalar sub-selects as arguments are assigned to the correct aggregate context.

FossilOrigin-Name: 16a41fa8c4c74bba4e908a9c19e6cf5a927cac140e2070c9abf303158be7257b

5 years agoModify a test file to avoid causing Tcl to allocate too much memory.
dan [Tue, 9 Jun 2020 13:53:56 +0000 (13:53 +0000)] 
Modify a test file to avoid causing Tcl to allocate too much memory.

FossilOrigin-Name: 232431f32ef77a9dfc4eeb7765dca24af72051fd5460f648d0c5ba318c8a01fc

5 years agoGive the expression pointer fields of AggInfo distinctive names in order to
drh [Tue, 9 Jun 2020 13:38:12 +0000 (13:38 +0000)] 
Give the expression pointer fields of AggInfo distinctive names in order to
simplify tracking of all their uses.

FossilOrigin-Name: a53bdd311c4154fd5e1131efbb9665362f79db5a35ce9f7b1547f74b8ee2d8ba

5 years agoImproved tree-view debugging output for aggregate functions.
drh [Tue, 9 Jun 2020 11:59:15 +0000 (11:59 +0000)] 
Improved tree-view debugging output for aggregate functions.

FossilOrigin-Name: b5711b4eead10ef4b0b61f2e2c54768d215a4105f6d47d2ea78991b6e53a6831

5 years agoFix a case where a corrupted fts3 record could cause an assert() failure, or spurious...
dan [Mon, 8 Jun 2020 14:43:41 +0000 (14:43 +0000)] 
Fix a case where a corrupted fts3 record could cause an assert() failure, or spurious SQLITE_NOMEM error in builds with assert() disabled.

FossilOrigin-Name: d48af4d2cfff3d5f4ccc3db5d658e8b503255b577e6e62b5c2b4a4437875b895

5 years agoWhen an Expr object is changed and that Expr is referenced by an AggInfo, then
drh [Mon, 8 Jun 2020 11:34:40 +0000 (11:34 +0000)] 
When an Expr object is changed and that Expr is referenced by an AggInfo, then
also update the AggInfo.  Also, persist all AggInfo objects until the Parse
object is destroyed.  This is a new fix for ticket [c8d3b9f0a750a529] that
avoids the follow-on problems identified by tickets
[0899cf62f597d7e7], [1f6f353b684fc708], [e5504e987e419fb0], and
[f7d890858f361402].

FossilOrigin-Name: 6e6b3729e0549de028f6c5bf494b2d69d621c81b61a1dc0a329d3950039342fb

5 years agoFix minor OOM problems. persist-agginfo
drh [Sun, 7 Jun 2020 22:44:23 +0000 (22:44 +0000)] 
Fix minor OOM problems.

FossilOrigin-Name: 8b23d80271aab38abe42ee8b3ca4b746572ecef26c2a37b094b01560e6be9d45

5 years agoAggInfo objects might be referenced even after the sqlite3Select() function
drh [Sun, 7 Jun 2020 20:18:07 +0000 (20:18 +0000)] 
AggInfo objects might be referenced even after the sqlite3Select() function
that created them has exited.  So AggInfo cannot be a stack variable.  And it
must not be freed until the Parse object is destroyed.

FossilOrigin-Name: 3c840b4df306e2db1da08673e9ede973b4cb6d2b3f9eeeab5835e39452ee3056

5 years agoAlternative fix to ticket [c8d3b9f0a750a529]: Prior to deleting or modifying
drh [Sun, 7 Jun 2020 17:33:18 +0000 (17:33 +0000)] 
Alternative fix to ticket [c8d3b9f0a750a529]:  Prior to deleting or modifying
an Expr not that is referenced by an AggInfo, modify the AggInfo to get its
own copy of the original Expr.

FossilOrigin-Name: 7682d8a768fbccfe0cc956e9f6481637146e1ab9763b248ff11052761ce32e32

5 years agoIn the debugging treeview output, change the name of "SELECT-expr" expression
drh [Fri, 5 Jun 2020 04:01:50 +0000 (04:01 +0000)] 
In the debugging treeview output, change the name of "SELECT-expr" expression
nodes to be "subquery-expr", so as to not confuse them with actual SELECT
nodes.

FossilOrigin-Name: c1c8937a30feff6aa4385b0c264fd8e70d54422a0629c2ce38082d85d3334a57

5 years agoAlways use ?...? to indicate optional arguments in the output of ".help"
drh [Fri, 5 Jun 2020 00:54:27 +0000 (00:54 +0000)] 
Always use ?...? to indicate optional arguments in the output of ".help"
in the CLI.  Change ".mode column" so that it automatically activates
".headers on" if headers have not been previously turned on or off.

FossilOrigin-Name: 2827c0a186596299e43eb3e7378eea462d2b060b2c3388ce5cb2bc8e0b43999e

5 years agoAdd support for "box" mode in the CLI: Like "table" except that it uses
drh [Thu, 4 Jun 2020 18:05:39 +0000 (18:05 +0000)] 
Add support for "box" mode in the CLI:  Like "table" except that it uses
unicode box-drawing characters instead of ascii-art.

FossilOrigin-Name: 6da784c9e174744d6deeb76c553b515b96c1fcb80c55a281e476959ec680fb72

5 years agoImproved display of ".mode table" output for empty result sets.
drh [Thu, 4 Jun 2020 16:54:10 +0000 (16:54 +0000)] 
Improved display of ".mode table" output for empty result sets.

FossilOrigin-Name: 7efabd683b79743b407ad71dda56db00fb0d668828bdc342145816b4f1c3bf3a

5 years agoUse __has_extension(c_atomic) instead of __has_feature(c_atomic) to detect support...
dan [Thu, 4 Jun 2020 16:34:49 +0000 (16:34 +0000)] 
Use __has_extension(c_atomic) instead of __has_feature(c_atomic) to detect support for atomic load and store operations with clang.

FossilOrigin-Name: 362255791f8801e0d9869e36239b8b2cb29c38bf0b86894bd2d159ce46d8447e

5 years agoUse AtomicStore() to set values in the wal-index hash table.
dan [Thu, 4 Jun 2020 16:07:51 +0000 (16:07 +0000)] 
Use AtomicStore() to set values in the wal-index hash table.

FossilOrigin-Name: 1ab30c75f2fe14d1ee77d0eace4e29ba8f805d63e2da0897b111ea1311f409aa

5 years agoWork around a bug in clang-11.0.0.
drh [Thu, 4 Jun 2020 02:50:47 +0000 (02:50 +0000)] 
Work around a bug in clang-11.0.0.

FossilOrigin-Name: 3c2bf8042ec46195c67dfd91df084f5bc19162fd26389920e716b310c80deea6

5 years agoFix for ticket [810dc8038872e212]. Thank to user "Maxulite" for tracking
drh [Wed, 3 Jun 2020 19:28:10 +0000 (19:28 +0000)] 
Fix for ticket [810dc8038872e212].  Thank to user "Maxulite" for tracking
down the problem!

FossilOrigin-Name: 89af93d77fa7959a4ee7364bae6c02c40963a3cdf80b0a4a8af9c9764d5c7bb5

5 years agoSimplification to the interrupt handling logic in sqlite3VdbeExec() saves
drh [Wed, 3 Jun 2020 15:59:22 +0000 (15:59 +0000)] 
Simplification to the interrupt handling logic in sqlite3VdbeExec() saves
a few bytes of code space.

FossilOrigin-Name: 43e0e59bd4e34c6e88c004ea951c0d76ff1cf0a034389f490495a5d12e239382

5 years agoImprove the query planner so that it is better able to find full
drh [Wed, 3 Jun 2020 03:00:09 +0000 (03:00 +0000)] 
Improve the query planner so that it is better able to find full
index scan plan when there is an INDEXED BY clause.

FossilOrigin-Name: d901837fea1ed54de43ad59eb47c02cbfd2eb215fc57317b5ea8c22a7df947c4

5 years agoDraw the dashes below the headers in "explain" mode in the CLI.
drh [Sat, 30 May 2020 15:34:49 +0000 (15:34 +0000)] 
Draw the dashes below the headers in "explain" mode in the CLI.

FossilOrigin-Name: c6b7833ac7d9cc75cb45d5e8041367ebd6f197f776766e6143535c227fc72a20

5 years agoImproved VDBE comments on the ANALYZE code generator. This change
drh [Sat, 30 May 2020 00:30:08 +0000 (00:30 +0000)] 
Improved VDBE comments on the ANALYZE code generator.  This change
also fixes a harmless use of an uninitialized integer variable as an input
to the %d format on a VDBE comment.

FossilOrigin-Name: 1cb248a3fc4c35c5bc3993b554edcccaa5c5e91570af67ebb99643a15221ae33

5 years agoEnhancements to the incremental build support for MSVC.
mistachkin [Fri, 29 May 2020 21:06:52 +0000 (21:06 +0000)] 
Enhancements to the incremental build support for MSVC.

FossilOrigin-Name: 2e25d915bcb8d6f1747f9befdef64d2e0e495cc6c5948a8eff5d0097b6613d06

5 years agoRemove a stray "&" character in the CLI, detected by a clang warning.
drh [Fri, 29 May 2020 20:16:19 +0000 (20:16 +0000)] 
Remove a stray "&" character in the CLI, detected by a clang warning.

FossilOrigin-Name: 5865d2f2d0333024366ecf1d919535fd4ec05c637feff16d75028ccdc8db4b50

5 years agoAdd the "shelltest" target to the MSVC makefile as well.
drh [Fri, 29 May 2020 19:45:03 +0000 (19:45 +0000)] 
Add the "shelltest" target to the MSVC makefile as well.

FossilOrigin-Name: 9924c0456bfcd2058c9620a93dfbfd4c7d960c68910ce6aed7364dff42baba5c

5 years agoFix the ".import" command of the CLI to clean up better after errors.
drh [Fri, 29 May 2020 19:39:35 +0000 (19:39 +0000)] 
Fix the ".import" command of the CLI to clean up better after errors.
Add the new "shelltest" makefile target on unix platforms.

FossilOrigin-Name: 50d4ddf1330b88551de51439eb535f385dee6b53013802dd62f832d16b3025b6

5 years agoImprovements to help text for the CLI.
drh [Fri, 29 May 2020 19:17:20 +0000 (19:17 +0000)] 
Improvements to help text for the CLI.

FossilOrigin-Name: 6a01e4c444b072e31a320121a6810d7c986c2c54ce45f9b11683233b1e7af8da

5 years agoFix a memory leak in the CLI when an unknown or unrecognized
drh [Fri, 29 May 2020 19:03:03 +0000 (19:03 +0000)] 
Fix a memory leak in the CLI when an unknown or unrecognized
argument is given to the ".dump" command.

FossilOrigin-Name: 71bfbbcc1a8d0e02073a381a5b31a5ccd5477011b22904b9989b6129d81f02e7

5 years agoImprovements to columnar output in the CLI. Columns automatically expand
drh [Fri, 29 May 2020 16:15:58 +0000 (16:15 +0000)] 
Improvements to columnar output in the CLI.  Columns automatically expand
to contain the largest row.

FossilOrigin-Name: 4e1db8e9a9ee370a398f13fd8546a520111b8cfb84460389535b5bc5bd9f4f82

5 years agoSpace to hold the ".width" of columns in the CLI is now obtained from
drh [Fri, 29 May 2020 14:38:43 +0000 (14:38 +0000)] 
Space to hold the ".width" of columns in the CLI is now obtained from
malloc() and hence is not limited in the number of columns supported.

FossilOrigin-Name: 445ed5dab2c26e9f4a7fb5277abdba3359d23cf5318cfd0d8322162d9616ee7a

5 years agoIncremental improvements to tabular output modes in the CLI. The
drh [Fri, 29 May 2020 12:31:53 +0000 (12:31 +0000)] 
Incremental improvements to tabular output modes in the CLI.  The
"markdown" and "table" modes no have headers turned on by default.

FossilOrigin-Name: af28bff91ad7e2d69db0052323c9c05c75a41d4134974bd1305f1c4f579d3558

5 years agoExpand upon a comment in os_unix.c. No changes to code.
dan [Fri, 29 May 2020 11:07:20 +0000 (11:07 +0000)] 
Expand upon a comment in os_unix.c. No changes to code.

FossilOrigin-Name: 77933dc4dbe0e0af3b13a14293a8bd684edc5056f4ae9291c6f95d4433bf90ce

5 years agoIn the json output mode of the CLI, do correct quoting of escape characters.
drh [Fri, 29 May 2020 00:21:43 +0000 (00:21 +0000)] 
In the json output mode of the CLI, do correct quoting of escape characters.
Also, show BLOBs as JSON strings, possibly with embedded \u0000 bytes.

FossilOrigin-Name: 0278147a7d2b50bed9f59ed3d3a04ecc6d46f072eb510e463f6707df1d829020

5 years agoProgress toward adding new output modes to the CLI: json, table, and
drh [Thu, 28 May 2020 23:49:50 +0000 (23:49 +0000)] 
Progress toward adding new output modes to the CLI:  json, table, and
markdown.

FossilOrigin-Name: 14f55fafec11491e87e6526c72cf85c689d74ba18418a1ae9646586ec206767a

5 years agoEnhance the ".quote" mode in the shell so that it honors .separator.
drh [Thu, 28 May 2020 20:37:17 +0000 (20:37 +0000)] 
Enhance the ".quote" mode in the shell so that it honors .separator.

FossilOrigin-Name: b5e33ed537e7d7dcabc9f6dc91d6838e0d1657f323440e09e2e24ffa2ba6141a

5 years agoWhen the sqlite_stat1 data is missing for some indexes of a table but is
drh [Thu, 28 May 2020 00:45:16 +0000 (00:45 +0000)] 
When the sqlite_stat1 data is missing for some indexes of a table but is
present for the table itself or for other indexes in the same table, then do
not let the estimated number of rows in that table get too small, as
doing so can deceive the query planner into ignoring a perfectly good index.

FossilOrigin-Name: 98d4262018a81a9a36dd8beb4b02ff0e75cdcbb8a121d143157ffb37b228d60d

5 years agoSmall performance improvement and size reduction in the expression
drh [Wed, 27 May 2020 12:44:28 +0000 (12:44 +0000)] 
Small performance improvement and size reduction in the expression
code generator.

FossilOrigin-Name: eeb53e219551d8a05a87f1de9a7cd9af295d08a296f1f435a8509ea1252ccdcc

5 years agoChange a datatype from i16 to int to appease Converity and help eliminate
drh [Wed, 27 May 2020 00:02:07 +0000 (00:02 +0000)] 
Change a datatype from i16 to int to appease Converity and help eliminate
a false-positive.

FossilOrigin-Name: 5b560ec49041d89c87ea3315d8fc17f7fb0e03a82091934be7373b290183f82e

5 years agoFix the cksumvfs extension so that it will not register itself more than
drh [Tue, 26 May 2020 20:33:18 +0000 (20:33 +0000)] 
Fix the cksumvfs extension so that it will not register itself more than
once.

FossilOrigin-Name: d5cdd57150db914b61b8b9c61c6caac9690fe7b647ee2c003e75b9b62be62752

5 years agoPerformance optimization in the transfer of error messages from statements
drh [Tue, 26 May 2020 20:31:17 +0000 (20:31 +0000)] 
Performance optimization in the transfer of error messages from statements
to connections.

FossilOrigin-Name: 0e898f4fed1c851cb90f940175110e632a20668a285d39f5f94f7358c3064882

5 years agoIncrease the version number to 3.33.0 to begin the next release cycle.
drh [Tue, 26 May 2020 11:23:48 +0000 (11:23 +0000)] 
Increase the version number to 3.33.0 to begin the next release cycle.

FossilOrigin-Name: 790badb390d59062cd2d8d1dec76cc6104c9425610a67503f6be38076b6a458e

5 years agoChanges to sqlite3SelectNew() to work around a false-positive warning
drh [Tue, 26 May 2020 11:10:25 +0000 (11:10 +0000)] 
Changes to sqlite3SelectNew() to work around a false-positive warning
from GCC-10.  The code is very slightly larger and slower as a result.

FossilOrigin-Name: 04e1edd8e5821a377407263829ed0d87968c708c9aeb1282107ea6f39a11c1cc

5 years agoInnocuous changes to help Coverity avoid false-positives.
drh [Tue, 26 May 2020 10:54:46 +0000 (10:54 +0000)] 
Innocuous changes to help Coverity avoid false-positives.

FossilOrigin-Name: 4ec8a5a203f10d228d0b3389120638766cc343179dbe38d5dbf69b650765934c

5 years agoVersion 3.32.1 version-3.32.1
drh [Mon, 25 May 2020 16:19:56 +0000 (16:19 +0000)] 
Version 3.32.1

FossilOrigin-Name: 0c1fcf4711a2e66c813aed38cf41cd3e2123ee8eb6db98118086764c4ba83350

5 years agoExtra assert() statements in the printf() logic.
drh [Mon, 25 May 2020 15:41:03 +0000 (15:41 +0000)] 
Extra assert() statements in the printf() logic.

FossilOrigin-Name: b1b182be2ab34cec1d94c5570bc361331a34f727eb9fa4aadfabb7f1ef79f83e

5 years agoDefensive code that tries to prevent a recurrence of problems like the
drh [Mon, 25 May 2020 15:19:52 +0000 (15:19 +0000)] 
Defensive code that tries to prevent a recurrence of problems like the
one described in ticket [7a5279a25c57adf1]

FossilOrigin-Name: 572105de1d44bca4f18c99d373458889163611384eebbc9659474874ee1701f4

5 years agoFix minor compile issues with optional extensions.
drh [Mon, 25 May 2020 12:49:58 +0000 (12:49 +0000)] 
Fix minor compile issues with optional extensions.

FossilOrigin-Name: 3261ee9ec26bbeaa64190c12556a1d8146270b6660c70004830bd38c1b5b63f4

5 years agoMake sure variable declarations are at start of scope even when
drh [Mon, 25 May 2020 12:02:12 +0000 (12:02 +0000)] 
Make sure variable declarations are at start of scope even when
SQLITE_ENABLE_SNAPSHOT is used.

FossilOrigin-Name: a77ceaf6ba934b1d73c90b8980191a65d02ad6ce1e11e6baf573b3a132685545

5 years agoAttempt to work around a false-positive warning in the CGo compiler. cgo-warning-workaround
drh [Mon, 25 May 2020 01:31:09 +0000 (01:31 +0000)] 
Attempt to work around a false-positive warning in the CGo compiler.

FossilOrigin-Name: d4bf60f464789935dc193ea99bf730c8fade448c7dca13eb3ce297965980f36e

5 years agoVersion number to 3.32.1.
drh [Sun, 24 May 2020 12:36:20 +0000 (12:36 +0000)] 
Version number to 3.32.1.

FossilOrigin-Name: 56e5063c326ffbfd3e3cb6f2b05718412aca2cb183274bfe11f5666effdd04b9

5 years agoWhen rewriting a query for window functions, if the rewrite changes the
drh [Sun, 24 May 2020 03:38:37 +0000 (03:38 +0000)] 
When rewriting a query for window functions, if the rewrite changes the
depth of TK_AGG_FUNCTION nodes, be sure to adjust the Expr.op2 field
appropriately.  Fix for ticket [7a5279a25c57adf1]

FossilOrigin-Name: ad7bb70af9bb68d192137188bb2528f1e9e43ad164c925174ca1dafc9e1f5339

5 years agoMove some utility Walker callbacks into the walker.c source file, as they
drh [Sun, 24 May 2020 03:01:36 +0000 (03:01 +0000)] 
Move some utility Walker callbacks into the walker.c source file, as they
seem to belong there better.

FossilOrigin-Name: dac438236f7c5419d4e7e094e8b3f19f83cd3b1a18bc8acb14aee90d4514fa3c

5 years agoImprovements to parse-tree tracing logic. No changes in deliverable code.
drh [Sun, 24 May 2020 02:05:04 +0000 (02:05 +0000)] 
Improvements to parse-tree tracing logic.  No changes in deliverable code.

FossilOrigin-Name: f7e5a68a7ebbb97a5beb050a75b3b4cf2fd6adc54653da993a8950fb3a5799f7

5 years agoMinor fix to a comment. No code changes.
drh [Sun, 24 May 2020 00:30:38 +0000 (00:30 +0000)] 
Minor fix to a comment.  No code changes.

FossilOrigin-Name: efdbb2b499bda8ffcfe54f5d6ece08a2c58fe7a490d9550785d806bd404abb8c

5 years agoLimit the "precision" of floating-point to text conversions in the printf()
drh [Sat, 23 May 2020 19:58:07 +0000 (19:58 +0000)] 
Limit the "precision" of floating-point to text conversions in the printf()
function to 100,000,000.  Fix for ticket [23439ea582241138].

FossilOrigin-Name: d08d3405878d394e08e5d3af281246edfbd81ca74cc8d16458808591512fb93d

5 years agoImproved bytecode comment.
drh [Sat, 23 May 2020 17:56:49 +0000 (17:56 +0000)] 
Improved bytecode comment.

FossilOrigin-Name: 9224f1543b51a674ad6d7db8e90d97e1b0d1abe68bed3417820ebd09d27270f9

5 years agoVersion 3.32.0 version-3.32.0
drh [Fri, 22 May 2020 17:46:16 +0000 (17:46 +0000)] 
Version 3.32.0

FossilOrigin-Name: 5998789c9c744bce92e4cff7636bba800a75574243d6977e1fc8281e360f8d5a

5 years agoChange a NEVER macro into a NO_TEST comment, as the conditional is reachable,
drh [Thu, 21 May 2020 20:38:39 +0000 (20:38 +0000)] 
Change a NEVER macro into a NO_TEST comment, as the conditional is reachable,
but only when compiling for Windows 32-bit.

FossilOrigin-Name: ce36b6d1331edba5a921fef32553e2470a79bdb1f62d2cfd81190691c83d5b06

5 years agoAvoid another potential OOB read in sqlite3expert.c.
dan [Thu, 21 May 2020 19:13:46 +0000 (19:13 +0000)] 
Avoid another potential OOB read in sqlite3expert.c.

FossilOrigin-Name: 0ccea80092f16e7f17f4c4de4f8be3fdef217199fcc08ace37e179c1b22c1294

5 years agoBack out the change from [7fab1393c2b22b1f] that tries to convert invalid
drh [Wed, 20 May 2020 15:02:04 +0000 (15:02 +0000)] 
Back out the change from [7fab1393c2b22b1f] that tries to convert invalid
surrogate characters in UTF16 into the replacement character 0xfffd, as we
find that this breaks some software.

FossilOrigin-Name: 4218c7b71fb6b227dbe4b852718584c150164af2d84e067cb810aa602554a609

5 years agoAdd compiler hints to disable TSAN for the routines that access the -shm
drh [Tue, 19 May 2020 15:51:10 +0000 (15:51 +0000)] 
Add compiler hints to disable TSAN for the routines that access the -shm
file header in WAL mode using a double-read with memory barrier.

FossilOrigin-Name: 3117c1b5a9e348fd8d16ba9d03fdafaad8514567fb3403f72b86d6162ad40bde

5 years agoIn os_win.c, avoid calling sqlite3_uri_boolean() on anything other than a main-db...
dan [Tue, 19 May 2020 15:40:07 +0000 (15:40 +0000)] 
In os_win.c, avoid calling sqlite3_uri_boolean() on anything other than a main-db filename.

FossilOrigin-Name: cb0a18e64f8d81c2ada9f698faaf5ca68a0666687bf6f3abc860324cb1997463

5 years agoUser-suggested improvement to the README.txt for the ICU extension.
drh [Tue, 19 May 2020 12:29:56 +0000 (12:29 +0000)] 
User-suggested improvement to the README.txt for the ICU extension.

FossilOrigin-Name: 1d1293c25abdd4b0fca64e5b1d0a118e2f339635dbc89422c0c2463fbf9ee27f

5 years agoIn wal.c, improved comments on concurrency issues. More use of
drh [Tue, 19 May 2020 12:27:29 +0000 (12:27 +0000)] 
In wal.c, improved comments on concurrency issues.  More use of
AtomicLoad() and AtomicStore().

FossilOrigin-Name: 4bf566feca3a8fbe5e386533aac30e0ac25836cfc820a3abd91e156bd6198b4a

5 years agoAdd vdbevtab.lo to build of libsqlite3.lib in Makefile.msc.
dan [Mon, 18 May 2020 18:02:37 +0000 (18:02 +0000)] 
Add vdbevtab.lo to build of libsqlite3.lib in Makefile.msc.

FossilOrigin-Name: f64d054b799c0af8d582fd9aff9bcbfa380ef08026ba5db8c5f89f6f56dfdad9

5 years agoAvoid harmless UB in memcpy() in the JSON extension.
drh [Sun, 17 May 2020 13:47:28 +0000 (13:47 +0000)] 
Avoid harmless UB in memcpy() in the JSON extension.

FossilOrigin-Name: 69e149f76853d196c8855fedfc98848b60fb116ac36bc08824b1a122469f8ece