]>
git.ipfire.org Git - thirdparty/sqlite.git/log
drh [Sat, 4 Jul 2020 20:29:56 +0000 (20:29 +0000)]
Fix the table_info pragma so that it always checks the schema version and
reprepares, even if it is a no-op.
FossilOrigin-Name:
6da77973abc325ae8baf64615267a614a0b8bb8dfd0a01a9f7d6c3a8f359564f
drh [Fri, 3 Jul 2020 21:24:42 +0000 (21:24 +0000)]
Fix the line-number of error messages coming out of the ".import" command
when the --skip option is used.
FossilOrigin-Name:
e0a8b11dfd6b3ab89ae5032d60cf3c1bba7198a1a2debe5c691b5d1f2e1befee
drh [Fri, 3 Jul 2020 21:18:07 +0000 (21:18 +0000)]
Fix a compiler warning about an unused procedure in the parser.
FossilOrigin-Name:
b27bb4fe389e12472a6144441df2dca6a7393024f2621fd22dd1a2b4033c46ec
drh [Fri, 3 Jul 2020 18:07:22 +0000 (18:07 +0000)]
Update the lemon documentation to match recent enhancements.
FossilOrigin-Name:
ca7630a5772ab919482a3629e11627143a1e1ec290a570ce4188189e671f9015
drh [Fri, 3 Jul 2020 17:24:35 +0000 (17:24 +0000)]
If the amalgamation is built using OPT_FEATURE_FLAGS =
-DSQLITE_UDL_CAPABLE_PARSER then it can be compiled with or without
the -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT option and it works either way.
FossilOrigin-Name:
1f96a29dd8654ee30d36982a8bcd3f17a4b9193d3879fdb38fa3f03eeeff3080
drh [Fri, 3 Jul 2020 15:41:08 +0000 (15:41 +0000)]
In lemon, add "%if" and "%else" and allow boolean expressions as the
argument to "%if", "%ifdef", and "%ifndef".
FossilOrigin-Name:
951d22b72f80de9e23df645abcc3d88ca1a275b46ea23b84152ef48716922b37
drh [Fri, 3 Jul 2020 12:32:04 +0000 (12:32 +0000)]
Fix the pragma_foreign_key_check virtual table so that it accepts arguments.
FossilOrigin-Name:
07f849dee3d245ecf80ba3c3ce8dfc630e71ddb1e9c0bcc1f08cee22001fcb07
drh [Fri, 3 Jul 2020 12:15:59 +0000 (12:15 +0000)]
Fix a problem with "PRAGMA foreign_key_check" where if a table in one
schema appears to have foreign key constraints against another table in
a different schema, the pragma will try to check the constraints even though
they do not apply because they are in different schemas.
FossilOrigin-Name:
81bc4b65ae2a68128b0be75a7a3d4f47f05cc588ff130ba56366ab9b16289228
drh [Thu, 2 Jul 2020 17:05:11 +0000 (17:05 +0000)]
Minor simplification to the 32-bit varint decoder.
FossilOrigin-Name:
6ffd17b668a8ad561c37e89063afb6e7f8425e557e93025b7527fe3656585d77
drh [Wed, 1 Jul 2020 16:19:14 +0000 (16:19 +0000)]
Ensure that the "PRAGMA schema_version" command causes the schema to be
reparsed and reloaded.
FossilOrigin-Name:
27d4a9a7b530c77a5b2593d1a5232b10746da9906f8d12890de7a8fbd7270256
dan [Wed, 1 Jul 2020 14:07:45 +0000 (14:07 +0000)]
Fix a problem with VM code generated for some aggregate SELECT statements that feature min()/max() aggregates both with and without FILTER clauses.
FossilOrigin-Name:
2094da753feb847254473b148d11e535c44dbae9b17454f1a4f8f7e90aefba3f
dan [Tue, 30 Jun 2020 18:21:45 +0000 (18:21 +0000)]
Add a test to ensure that "PRAGMA wal_checkpoint = FULL" invokes the busy-handler to wait on read-locks.
FossilOrigin-Name:
f068fb116286b1dbdee9c168900348cfcab84e6d8413f3456e4e492f650d11b0
dan [Tue, 30 Jun 2020 15:32:12 +0000 (15:32 +0000)]
Avoid a potential buffer overread in fts3 when processing corrupt records.
FossilOrigin-Name:
4d0cfb1236884349168f8e2ec5e18c0232965148af78615e0d5c9b0e13a35422
drh [Mon, 29 Jun 2020 20:26:50 +0000 (20:26 +0000)]
Fix generated columns so that they play well with upsert.
See the [https://sqlite.org/forum/forumpost/
73b9a8ccfb |forum post]
by "iffycan" for details.
FossilOrigin-Name:
fa9d93cf32fac4b86044acf5d1b9ea2f36e964ed7142cf1d270986c9ef3fb766
drh [Mon, 29 Jun 2020 20:20:40 +0000 (20:20 +0000)]
Change the magic number used to identify the "excluded" pseudo-table in
an UPSERT statement into a #define constant.
FossilOrigin-Name:
e96c2ac9ab1a1c51b1498f4b91fb71d2987c30579d072b2f0297da9eb945cb97
drh [Mon, 29 Jun 2020 20:09:04 +0000 (20:09 +0000)]
Document the dual-use of the P5 operand to the OP_MakeRecord opcode.
FossilOrigin-Name:
a73f80f22a585d1a2f55650d5cda4ece6c4ef039ef5eae2c02c3e5c269d4c30a
drh [Mon, 29 Jun 2020 18:30:49 +0000 (18:30 +0000)]
Change the name of IntegrityCk.mallocFailed to IntegrityCk.bOomFault to
avoid confusion with the sqlite3 object field with the same name.
FossilOrigin-Name:
87c7d962581f4bb1224086701352850ede9847dc76235b33c7c2a35ef594d382
dan [Mon, 29 Jun 2020 17:52:53 +0000 (17:52 +0000)]
Add test script to verify busy-timeouts are working for SQLITE_ENABLE_SETLK_TIMEOUT builds.
FossilOrigin-Name:
ada43e7c490bf72a50ee84e1db994e149744b2a943260449076b83d1874813b2
drh [Mon, 29 Jun 2020 16:30:10 +0000 (16:30 +0000)]
Do not run resetAccumulator() after a malloc failure.
FossilOrigin-Name:
1b426603f05033bcee0331c6f664cd5ed2ebf8f5d4cde8c6673c7a699ff53bb1
dan [Mon, 29 Jun 2020 13:33:56 +0000 (13:33 +0000)]
Fix another fts3 problem with processing corrupt records.
FossilOrigin-Name:
6e0ffa205312416830340ea6e621dfb1a529e5603d569941ed6263930dc28c45
drh [Mon, 29 Jun 2020 13:12:42 +0000 (13:12 +0000)]
Small performance improvement in the sqlite3_step() interface.
FossilOrigin-Name:
61400ef9f1337c77263b4d3e43a1983b0c4cf7137f066a2691768c98877035ef
dan [Fri, 26 Jun 2020 20:41:18 +0000 (20:41 +0000)]
Fix a problem that could cause an infinite loop in the fts3 'merge' command.
FossilOrigin-Name:
be545f85a6ef09cc6c762f7d2ab7a0b3adf5590c3fbdc9903e6b5b5cec6e823f
drh [Fri, 26 Jun 2020 17:56:43 +0000 (17:56 +0000)]
When computing the verification hash in speedtest1, do not include the
value of floating point results (which can very in trailing bits depending
on platform) but merely hash the fact that a floating point value was
received.
FossilOrigin-Name:
e12225d59c63ba392db4fa8dc26700ac26b20c8b98ea5107eef0e0b5138ace87
drh [Fri, 26 Jun 2020 16:17:27 +0000 (16:17 +0000)]
Improvements to speedtest1.c for more consistent verification hashes.
FossilOrigin-Name:
d34b8ff5f8d04a75996f6ca9d3a0563c83e8e833c1eb08ac3861431f36f7bfb1
drh [Fri, 26 Jun 2020 15:42:55 +0000 (15:42 +0000)]
Improvements to speedtest1. Added the --memdb and --output options. The
--verify option now outputs a hash of SQL outputs. The speed-check.sh script
disables the hashing feature with --legacy and adds the --verify option.
FossilOrigin-Name:
f3455cecf22ea98f9ad48e92d620c8e2ec94877e4581731afff0f2bd32014a1d
drh [Fri, 26 Jun 2020 15:32:29 +0000 (15:32 +0000)]
Add the ieee754_to_blob() and ieee754_from_blob() functions. Fix the handling
of subnormal forms in the two-argument version of ieee754().
FossilOrigin-Name:
c78cbf2e86850cc6882d3f0bd5415f6e731c3c675ffe77bb343682c619cb8cd9
drh [Fri, 26 Jun 2020 14:05:58 +0000 (14:05 +0000)]
Add --verify to speed-check.sh and add --memdb and --output to speedtest1.c.
Other improvements to speedtest1.c.
FossilOrigin-Name:
89a11120ab2ce13f8a539cb05a9d0628a1f83b4790910b2023c21d60aabc43ee
drh [Fri, 26 Jun 2020 04:34:28 +0000 (04:34 +0000)]
Fix a possible null pointer deref following OOM. Discovered by dbsqlfuzz.
FossilOrigin-Name:
cc888878ea8d5bc754c69de523819d32d6d9853857e31d7287f9dbfd723428db
drh [Thu, 25 Jun 2020 23:21:09 +0000 (23:21 +0000)]
Update the showlocks utility program so that it functions on files with
a huge number of locks without overflowing the stack.
FossilOrigin-Name:
adb7484f93329c7a94cd84e30bc4a8dbf2d6e901eba17cc3454afb8ba346cbf4
drh [Thu, 25 Jun 2020 20:28:13 +0000 (20:28 +0000)]
Enhance the --verify option to speedtest1.c so that it computes and displays
a hash of the result from all SQL queries, for verification purposes.
FossilOrigin-Name:
60d1e46c8c8a3c853034fd79f204bcb5d50d1c366eb246849c333a2d0abc2648
drh [Wed, 24 Jun 2020 15:06:29 +0000 (15:06 +0000)]
Add the ieee754_mantissa() and ieee754_exponent() functions to the iee754
extension. Build the ieee754 extension into the CLI.
FossilOrigin-Name:
db2f0836b64cd2e119684f1cf75fa3b19a84ca6aca1a239f7e2b9298016e2c95
drh [Wed, 24 Jun 2020 13:52:10 +0000 (13:52 +0000)]
Fix the decoding of subnormal values in the ieee754 extension.
FossilOrigin-Name:
838817b680f02b3845d6d56f85d5d36fa5ae7453afef7a1a5a24624255f2dc3e
drh [Wed, 24 Jun 2020 13:14:00 +0000 (13:14 +0000)]
In the one-argument version of the ieee754() extension function, if the
argument is an 8-byte blob, interpret that blob as a binary64 floating point
and decode it.
FossilOrigin-Name:
4199c1e8aa47d77df3ef598cb6f5418f67970dd00f34823463c85eabfc8d2b77
drh [Wed, 24 Jun 2020 12:29:19 +0000 (12:29 +0000)]
Add the decimal extension. It is built into the shell, but is an optional
add-on for the library. It is not included in the amalgamation.
FossilOrigin-Name:
5391687bf8563b3fdd157b436b2cbb6a0ee5f676727d41bbddfaa8eacc39729b
drh [Wed, 24 Jun 2020 11:45:35 +0000 (11:45 +0000)]
Fix the ".selecttrace" command in the CLI (only available when compiled
with the non-standard -DSQLITE_ENABLE_SELECTTRACE option) so that it does
not segfault if invoked without any arguments.
FossilOrigin-Name:
d45c27a3e5edaa2bd9ff0473e18c6536aa5d15f9a4d22dfee894a5ee4347f8d7
drh [Tue, 23 Jun 2020 20:03:57 +0000 (20:03 +0000)]
Enhance the --testset option on speedtest1 so that it can accept a
comma-separated list of test modules to run in order.
FossilOrigin-Name:
780e8aaa231b2b585505c3886d5a13d39dba546fdd8020331ad4de2ae92922b0
drh [Tue, 23 Jun 2020 17:57:08 +0000 (17:57 +0000)]
Try to remove end-of-line whitespace when building the amalgamation.
FossilOrigin-Name:
be3e7814e4cdbc09eaa5112d7d4135b3a2cedbfe66217d9973b1b39a44464e93
drh [Tue, 23 Jun 2020 15:29:22 +0000 (15:29 +0000)]
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
drh [Mon, 22 Jun 2020 21:25:37 +0000 (21:25 +0000)]
drh [Mon, 22 Jun 2020 19:12:23 +0000 (19:12 +0000)]
An extension for doing decimal arithmetic on strings.
FossilOrigin-Name:
4c3b85607feb53462ccc8b89bea699fdb132c402eae597afa33cc40a85c32329
dan [Mon, 22 Jun 2020 16:02:06 +0000 (16:02 +0000)]
Fix problems with handling return value of mmap() in lsm_unix.c (mmap() returns MAP_FAILED on error, not NULL).
FossilOrigin-Name:
da06168c09df5c0e8e10d0f9618e69217d4c0173a8199660bad2805f009d7b08
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
mistachkin [Fri, 19 Jun 2020 15:35:07 +0000 (15:35 +0000)]
Reverse unintentional spacing change in the previous check-in.
FossilOrigin-Name:
c7b2ee1edb108430454578c1623ba6aee1e2a7bc30cb2f9884ea3e21c3b75635
mistachkin [Fri, 19 Jun 2020 15:33:23 +0000 (15:33 +0000)]
Include 'sqlite3rc.h' in the amalgamation archive targets.
FossilOrigin-Name:
3df579ca32e8250725957d1982897a43281c73e8373af49abd6e7bd674f30e74
drh [Fri, 19 Jun 2020 15:24:12 +0000 (15:24 +0000)]
Extend the refactoring into extensions. Clean up stray newlines.
FossilOrigin-Name:
7a876209a678a34c198b54ceef9e3c041f128a14dc73357f6a57cadadaa6cf7b
drh [Fri, 19 Jun 2020 13:33:53 +0000 (13:33 +0000)]
Further refactoring of the schema table name.
FossilOrigin-Name:
9536fa0ae0c1ae6e2e98d2fa11e5acda7f3c9b8ca5061b6f7f8cae63a11d936b
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
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
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
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
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
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
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
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
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
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
drh [Mon, 15 Jun 2020 14:38:57 +0000 (14:38 +0000)]
Fix the --enable-update-limit option to ./configure.
FossilOrigin-Name:
d31fd57ea538668238787fde10a6a57bbd8a428c73f2e54b2e95ee9a645bc75b
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
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
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
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
drh [Fri, 12 Jun 2020 15:45:02 +0000 (15:45 +0000)]
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
drh [Fri, 12 Jun 2020 00:31:52 +0000 (00:31 +0000)]
Remove a NEVER() that turns out to be reachable.
FossilOrigin-Name:
44e573ecd5c2b60107133d60c51f3a04a3f904e9c1cf926e9b8ea977c7acae8d
drh [Thu, 11 Jun 2020 16:04:10 +0000 (16:04 +0000)]
Add a new assert() to the SELECT processing.
FossilOrigin-Name:
98cea4a32ba558c137d71a5e373a6803d764d34c5640907371dcf6468ffb2e64
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
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
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
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
drh [Wed, 10 Jun 2020 03:07:26 +0000 (03:07 +0000)]
Disable AggInfo consistency checks when unwinding after an OOM.
FossilOrigin-Name:
65179814aa0ae5927bae97c10ef20f290535399b889d96d5b88931f62635f212
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
drh [Tue, 9 Jun 2020 22:11:06 +0000 (22:11 +0000)]
Mark an always-true conditional with ALWAYS().
FossilOrigin-Name:
35a236841764a10cdcda63f34e1a8e7ffa43933bc89cb32f675454327834d7bf
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
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
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
drh [Tue, 9 Jun 2020 11:59:15 +0000 (11:59 +0000)]
Improved tree-view debugging output for aggregate functions.
FossilOrigin-Name:
b5711b4eead10ef4b0b61f2e2c54768d215a4105f6d47d2ea78991b6e53a6831
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
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
drh [Sun, 7 Jun 2020 22:44:23 +0000 (22:44 +0000)]
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
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
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
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
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
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
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
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
drh [Thu, 4 Jun 2020 02:50:47 +0000 (02:50 +0000)]
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
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
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
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
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
mistachkin [Fri, 29 May 2020 21:06:52 +0000 (21:06 +0000)]
Enhancements to the incremental build support for MSVC.
FossilOrigin-Name:
2e25d915bcb8d6f1747f9befdef64d2e0e495cc6c5948a8eff5d0097b6613d06
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
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
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
drh [Fri, 29 May 2020 19:17:20 +0000 (19:17 +0000)]
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