]>
git.ipfire.org Git - thirdparty/sqlite.git/log
drh [Tue, 3 Sep 2019 14:27:25 +0000 (14:27 +0000)]
When we play games with COLLATE in order to commute an operator in the
WHERE clause processing, be sure not to use the commuted operator to qualify
a partial index, as insufficient COLLATE information is preserved to verify
that the expression will correctly qualify the index.
Ticket [
767a8cbc6d20bd68 ]
FossilOrigin-Name:
5351e920f489562f959ab8a376ff720f845ea165e0cdc7c3a271aac53c2aa64a
drh [Mon, 2 Sep 2019 22:13:06 +0000 (22:13 +0000)]
dan [Mon, 2 Sep 2019 14:46:12 +0000 (14:46 +0000)]
Fix a potential crash in fts5 caused by using an auxiliary function on a "special" query like '*id' or '*reads'.
FossilOrigin-Name:
9490683ae883561fa347cbe54ebdd61188d849b4852d904b508250ba5d0807ef
drh [Mon, 2 Sep 2019 02:21:58 +0000 (02:21 +0000)]
When applying the IN_INDEX_NOOP optimization and the LHS has REAL affinity,
also apply REAL affinity to each element of the RHS.
Ticket [
2841e99d104c6436 ].
FossilOrigin-Name:
88833a9c2849c959a37a80e0e4d2b211ce3c83a48319724c89b172b060c876b4
drh [Mon, 2 Sep 2019 01:25:07 +0000 (01:25 +0000)]
Fix an obsolete comment that defines the meaning of one of the parameters
to the sqlite3FindInIndex() subroutine. No changes to code.
FossilOrigin-Name:
0c946f0846b2835f8facca806a4d4ecc2b2e97343de245a0d91716d998b2a829
drh [Mon, 2 Sep 2019 00:58:44 +0000 (00:58 +0000)]
When computing an expression value for an index-on-expression or a CHECK
constraint and the expressions uses a REAL table column, but the value of
that column is an integer (in other words, when it is using the
store-real-as-integer optimization) be sure to promote the value to real
before evaluating the expression. Ticket [
57af00b6642ecd68 ].
FossilOrigin-Name:
0658c16e311393c8a347b1bd41fa5dbfd2e184aa75d84c011aa8dbac79b632e9
drh [Sun, 1 Sep 2019 23:36:33 +0000 (23:36 +0000)]
Remove an obsolete paragraph from the OP_Column documentation. No code
changes.
FossilOrigin-Name:
f6d8956cf8b5993a4332b9330e89d5c3d5f8872ea5a2ce3d2e91127406cc1839
drh [Sat, 31 Aug 2019 20:29:28 +0000 (20:29 +0000)]
drh [Sat, 31 Aug 2019 20:26:06 +0000 (20:26 +0000)]
drh [Sat, 31 Aug 2019 20:13:30 +0000 (20:13 +0000)]
Improvements to the algorithm that determines which SELECT in a sequence
of nested SELECT statements that an aggregate function belongs to. This
resolves an issue identified by dbsqlfuzz.
FossilOrigin-Name:
d768007473f4ed40abbdf2c7e501b580b1cc37c1620c7cb90af1f208a8c35145
dan [Sat, 31 Aug 2019 17:14:35 +0000 (17:14 +0000)]
If a DELETE trigger fired by an UPDATE OR REPLACE statement deletes the row being updated, do not attempt to proceed with the original UPDATE operation. Fix for [
d6a0fbc1 ].
FossilOrigin-Name:
4145b3e05051ba6729105157a876793ad14a05d895fc10fe704f437eab16ea93
drh [Sat, 31 Aug 2019 01:33:19 +0000 (01:33 +0000)]
Remove some affinity tests that became unreachable due to the prior change.
FossilOrigin-Name:
e2db1123faac26c0e0b6a1ebef1685ea7633bfcafd1ff743ba5380700f7745af
drh [Fri, 30 Aug 2019 23:56:34 +0000 (23:56 +0000)]
When the affinity of a table column is INT or REAL, make the affinity of
corresponding index columns NUMERIC. This increases the precision of
index lookups for large numbers so that it matches the precision of
ordinary comparison operators. Ticket [
40812aea1fde9594 ]
FossilOrigin-Name:
e0d909c740b774d8a46731696e33342be83206cc4a95d07f42fdb3d8cc2d7a8e
drh [Fri, 30 Aug 2019 23:15:00 +0000 (23:15 +0000)]
Make sure OP_RealAffinity has been applied to all columns of type REAL
in the excluded.* pseudo-table of an UPSERT.
Ticket [
5a3dba8104421320 ]
FossilOrigin-Name:
67381dadede98a55d8d9e085d021e6fa6473071978967b6302e03b28cf2245e1
drh [Fri, 30 Aug 2019 21:52:13 +0000 (21:52 +0000)]
Improvements to VDBE tracing. No changes to code in normal deliverables.
FossilOrigin-Name:
54553bf16fabd72d1967acef317beb518e086707ccd45890b7c7256b8da08b75
dan [Fri, 30 Aug 2019 19:45:03 +0000 (19:45 +0000)]
Add test case to window8.test. Also fix an error in a comment in window.c.
FossilOrigin-Name:
2925bfa5971c8557ecaa6ac18df0825ebbbd1622017509e83451d90640146fa8
drh [Fri, 30 Aug 2019 18:02:49 +0000 (18:02 +0000)]
Back out the change at [
47cd634c98b502d4 ] which was incorrect. Add a test
case so that we don't accidently back out that change again.
FossilOrigin-Name:
596ac2a4eab28b74f4050fb4eb71883f2a1421fdbccf302413e4653391bb52c9
dan [Fri, 30 Aug 2019 17:28:55 +0000 (17:28 +0000)]
drh [Fri, 30 Aug 2019 16:46:12 +0000 (16:46 +0000)]
New test cases for window functions with RANGE BETWEEN and DESC NULLS FIRST.
FossilOrigin-Name:
f7002f86c780e279c9f8a6268f317586519c059c9de2115ff6f1cad272570c29
dan [Fri, 30 Aug 2019 16:14:58 +0000 (16:14 +0000)]
Fix a bug in RANGE window functions that use "ORDER BY <expr> DESC NULLS FIRST" as the window-frame ORDER BY clause.
FossilOrigin-Name:
39b4cad4a51bb5116d62ffb16ac36d96a9280321b049eb2d008605392f52a459
drh [Fri, 30 Aug 2019 16:00:58 +0000 (16:00 +0000)]
The expression "(X IS FALSE) IN (FALSE)" does not imply that X is NOT NULL.
Ticket [
f8f472cbc77ba9c9 ]
FossilOrigin-Name:
dd66134817ecbda01c59a05ad0d6ac44bee700ab10cd2119c869dd69af293fe2
drh [Fri, 30 Aug 2019 15:11:08 +0000 (15:11 +0000)]
The expression "(X IS FALSE) BETWEEN FALSE AND TRUE" does not implie that
X is not NULL. Ticket [
fba33c8b1df6a915 ]
FossilOrigin-Name:
057fb8b1809b8b9c8fff0fd0804153b9644f0545c23c6ddc4758bda3381094b9
drh [Fri, 30 Aug 2019 13:07:06 +0000 (13:07 +0000)]
The expression "(x IS FALSE) IS FALSE" does not imply that X is not NULL.
Ticket [
a6408d42b9f44462 ]
FossilOrigin-Name:
45ff2b1f2693bb0231a864a511bb82cf2a5945ab3d806a5bbaf1517ecb287883
drh [Thu, 29 Aug 2019 23:24:18 +0000 (23:24 +0000)]
dan [Thu, 29 Aug 2019 21:16:46 +0000 (21:16 +0000)]
Improve vdbe branch coverage of NULLS LAST code.
FossilOrigin-Name:
e8e9f77d52974f6ba0a536d05837b280a996745deb3a2169bb29379f10e49df4
dan [Thu, 29 Aug 2019 19:34:29 +0000 (19:34 +0000)]
drh [Thu, 29 Aug 2019 16:48:10 +0000 (16:48 +0000)]
drh [Thu, 29 Aug 2019 16:17:59 +0000 (16:17 +0000)]
Remove an unreachable branch in the NULLS LAST logic of RANGE window
functions.
FossilOrigin-Name:
47cd634c98b502d40a493455ba6d73cbd0dae74944f9cf06fcbcd025f4b49d6e
dan [Thu, 29 Aug 2019 15:50:16 +0000 (15:50 +0000)]
Fix another case where SQLite assumes that if "~(? AND FALSE)" is true, "?" must be non-null.
FossilOrigin-Name:
616f5663b3dbd0929128c0990fc6d8bba1513c7ae196b87c450ac0b3b3203ecd
dan [Thu, 29 Aug 2019 15:06:35 +0000 (15:06 +0000)]
Avoid assuming that for "~ (? OR TRUE)" to be true, "?" must not be NULL, just as we do for "NOT (? OR TRUE)". Fix for ticket [
c0390363 ].
FossilOrigin-Name:
84ae41fd2f50cb7c0c3f6522d0f94817e1bbf96eae5316279e3e32cee4e46e91
dan [Thu, 29 Aug 2019 14:25:44 +0000 (14:25 +0000)]
Fix a potential buffer overrun in fts5 caused by corrupted database records.
FossilOrigin-Name:
c465d0eb478e42045e08efe8b6fa64d4bd4d747cdf743beae4608562b014169e
drh [Thu, 29 Aug 2019 00:27:12 +0000 (00:27 +0000)]
Improve Lemon so that it enlarges some of its tables slightly in order to
avoid having to index range checks on table lookups for a performance
increase.
FossilOrigin-Name:
4be6a23a188bd1fea445283d6dcc2f5c3470c28852dc4895d63117ad0c773fcf
drh [Wed, 28 Aug 2019 11:49:45 +0000 (11:49 +0000)]
Fix an unreachable branch in sqlite3ParserFallback()
FossilOrigin-Name:
e059178b47109caee2c2211b2db6e594c014af636677118a64e10edf01ac017d
drh [Wed, 28 Aug 2019 11:31:11 +0000 (11:31 +0000)]
Further improvements to parser speed by enlarging lookup tables to eliminate
the need to do range checking on the index prior to lookup.
FossilOrigin-Name:
47d3e091ae49eb7947af5abef9b5b96b16b86d349e51fe0677795649be6db473
drh [Wed, 28 Aug 2019 02:09:47 +0000 (02:09 +0000)]
Increase the size of the yy_lookahead table so that it is never necessary to
down bounds checking on the index.
FossilOrigin-Name:
bafd872398e58766e996963372c7acc03a1e20a6d39a3867ca45d3ea0ed2ac1d
dan [Tue, 27 Aug 2019 19:59:21 +0000 (19:59 +0000)]
Add support for "ORDER BY ... NULLS FIRST" and "ORDER BY ... NULLS LAST". Use this to fix ticket [
f8a7060e ].
FossilOrigin-Name:
94085fb3e756bc984237b74b6e29c68462ad860870c64dcb5124feaeec387660
drh [Tue, 27 Aug 2019 17:59:01 +0000 (17:59 +0000)]
The ALWAYS() added by the previous check-in was incorrect. Take it back out.
FossilOrigin-Name:
336235db2b1167cdb2feb64b47eb6368c97c43ee9641b7bfccc5775a41dd0d0e
drh [Tue, 27 Aug 2019 17:28:05 +0000 (17:28 +0000)]
Add ALWAYS() to an always true conditional that results from the
previous check-in. Add a test case for ticket [
dbaf8a6820be1ece ] to
supplement those already checked into TH3.
FossilOrigin-Name:
aff209804722ac902c7abfde80ad2677e0f51beb2c7f28f65d51105d984a1640
drh [Tue, 27 Aug 2019 17:01:07 +0000 (17:01 +0000)]
Omit the "x IN (y)" to "x==y" optimization of check-in [
e68b427afbc82e20 ]
(and ticket [
e39d032577df6942 ]) as it causes difficult affinity problems
as demonstrated by ticket [
dbaf8a6820be1ece ] and the original assertion fault
is no longer a factor due to countless other changes of the previous 5 years.
FossilOrigin-Name:
7f5168a76a400fc2e1e40c6950470b1bfb38a0be54fc5518c17c29fdae7d8f1f
drh [Tue, 27 Aug 2019 10:05:45 +0000 (10:05 +0000)]
If a TEMP TRIGGER references an auxiliary schema, and that auxiliary schema
is detached, move the trigger to reference the TEMP schema before completing
the detach, so that the trigger does not hold a dangling schema pointer.
FossilOrigin-Name:
069c2f4c61f06211a8981abc412afcc1536ece13380b13a70aa99123f8f527cd
drh [Mon, 26 Aug 2019 20:41:33 +0000 (20:41 +0000)]
dan [Mon, 26 Aug 2019 14:57:58 +0000 (14:57 +0000)]
Tweak the shell tool ".recover" command so that it can recover rows that consist of a rowid and no fields.
FossilOrigin-Name:
279ac7fdec0b1409cd400b7b093f89089d93c49f596f378c6a3032434a85bf83
drh [Mon, 26 Aug 2019 14:18:28 +0000 (14:18 +0000)]
Improved detection of number of column mismatch for vector assignment
in UPDATE statements. Ticket [
78acc9d40f0786e8 ]
FossilOrigin-Name:
bd4bda73df3794eef424eb13e08fc7cc54347d1ac69febaeec41f6b6cb4a42bc
drh [Mon, 26 Aug 2019 13:45:49 +0000 (13:45 +0000)]
drh [Mon, 26 Aug 2019 12:50:01 +0000 (12:50 +0000)]
Enforce 80-character line discipline in the CLI. Minor improvements to the
CLI built-in help.
FossilOrigin-Name:
9690013a00d73a8047b25149ded50d20c74b5c62c0725eec50ed8477688e58a0
dan [Sat, 24 Aug 2019 21:02:47 +0000 (21:02 +0000)]
Minor performance improvement for balance_nonroot().
FossilOrigin-Name:
d7434cae3edc321e2f1f8d340a0e656b1613b736f8400fb271a0e80f59401b9e
dan [Sat, 24 Aug 2019 17:11:29 +0000 (17:11 +0000)]
Fix a potential buffer overrun in fts5 caused by corrupt database records.
FossilOrigin-Name:
156d612800a7282fe0ebb20feb31d3fd577f4ab60fab8c00940c87143997aefb
drh [Fri, 23 Aug 2019 23:05:32 +0000 (23:05 +0000)]
Fix the built-in edit() SQL function in the CLI so that it works with
zero-length blobs.
FossilOrigin-Name:
e32490128684cfeeb8213baecc78a7942b8fb63d00e375edd965bf236faeed18
dan [Fri, 23 Aug 2019 20:33:01 +0000 (20:33 +0000)]
Move some things in parse.y so that TK_COLUMN and TK_AGG_COLUMN are assigned the same values as they are on trunk for a very small speedup.
FossilOrigin-Name:
d26fdfa3bc5f8d9c4a6000462080b0dd508e5cae9a83e0d126be48195224da8c
drh [Fri, 23 Aug 2019 17:09:02 +0000 (17:09 +0000)]
Revise the VDBE comments for NULL-scan so that they also work make
sense when reading a NULLS FIRST plan.
FossilOrigin-Name:
bfe793780fa6fc7a1e7d0ee60606dda272985de9573887dca118e9510fc609f2
drh [Fri, 23 Aug 2019 17:00:22 +0000 (17:00 +0000)]
Additional simplifications of the WHERE loop code generator logic for
NULLS LAST.
FossilOrigin-Name:
1383680d927d7d703933be7653c0019199845e7f7e82bcc76d9ca3808093e9d8
drh [Fri, 23 Aug 2019 16:12:20 +0000 (16:12 +0000)]
Simplification of the WHERE loop code generator for NULLS LAST saves a
few CPU cycles and about a hundred bytes of code space.
FossilOrigin-Name:
e3ed2f496f51234a8f81d90d47ba603b06dbed38b8bd8f1934294379cde74d3a
drh [Fri, 23 Aug 2019 13:32:03 +0000 (13:32 +0000)]
Invert the meaning of the regBignull flag so that it is 1 when doing the
normal scan and 1 when scanning nulls. This enables the re-do jump at the
bottom of the loop to be coded with a single OP_IfNotZero opcode, rather
than a sequence of OP_If, OP_Integer, OP_Goto.
FossilOrigin-Name:
bf875e1a259a4167694e06349458452dc36c1d38aa6843518d9ae46ce74e5559
drh [Fri, 23 Aug 2019 13:08:49 +0000 (13:08 +0000)]
Extra VDBE comments in the NULLS LAST logic provide landmarks to help
understand the EXPLAIN output.
FossilOrigin-Name:
649b08ead50f10a9ec0357a5e1ed020195d9f93be61ef703ea036a8e53f07a34
drh [Thu, 22 Aug 2019 21:13:56 +0000 (21:13 +0000)]
drh [Thu, 22 Aug 2019 19:35:24 +0000 (19:35 +0000)]
Merge fixes from trunk. Also fix a reference to the KeyInfo.aSortOrder field,
which should now be KeyInfo.aSortFlags
FossilOrigin-Name:
63e625c8eb06720eef30573aa562e38c90d228a9cf493f8bb59f09e50f0e3168
drh [Thu, 22 Aug 2019 16:38:42 +0000 (16:38 +0000)]
Fix the likely(), unlikely(), and likelihood() functions so that they have
no affinity, just like any other function.
Ticket [
7e07a3dbf5a8cd26 ]
FossilOrigin-Name:
44578865fa7baf9760e355691ca9ce753295aaba7a4ee0bba29d4f85d9335bab
drh [Thu, 22 Aug 2019 11:11:28 +0000 (11:11 +0000)]
Fix a false-positive in sqlite3ExprNeedsNoAffinityChange().
Ticket [
ac184eb571d5e6e0 ]
FossilOrigin-Name:
e62eddbb048cbc2c15cb8eeb5b7a907e7cb08c21a27ebba96a069f62dbcb0f30
drh [Thu, 22 Aug 2019 00:53:16 +0000 (00:53 +0000)]
Fix the OP_SeekGE, OP_SeekGT, OP_SeekLE, and OP_SeekLT opcodes so that they
preserve the datatype of the value in the register used as the key.
Ticket [
d9f584e936c7a8d0 ]
FossilOrigin-Name:
81b9f0f55042777b37de78069f7089041a9ee21dd0a0c86b879053fb46e140b4
dan [Wed, 21 Aug 2019 19:58:11 +0000 (19:58 +0000)]
Add missing VdbeCoverage() macros to new code.
FossilOrigin-Name:
b1cbcdc6eb42cca0c42a05e0d6ba4c6c7f09adff0c59ecfc5b434a94dec07a41
dan [Wed, 21 Aug 2019 17:46:34 +0000 (17:46 +0000)]
dan [Wed, 21 Aug 2019 15:41:50 +0000 (15:41 +0000)]
Update this branch with latest trunk changes.
FossilOrigin-Name:
6153bcf41a9aa0497f8210311c99ac23846223068f2b6a3a1c2d9dec7673c7e1
dan [Wed, 21 Aug 2019 14:54:50 +0000 (14:54 +0000)]
Avoid assuming that "column IS ?", where column is declared UNIQUE, matches only a single row (as "?" might be NULL). Fix for [
b8689402 ].
FossilOrigin-Name:
d02490a2f0cae047087130b4ad8f55f265845c2ffb3bde3b7d507edb54acea6d
dan [Wed, 21 Aug 2019 11:31:48 +0000 (11:31 +0000)]
Fix a broken assert() in the fts3 snippet code that was failing for queries containging more than 64 phrases.
FossilOrigin-Name:
4c01e0170e113ad052b6c3980beb4be9f1dc03fb3cf34132b90e8b82b23f654e
dan [Tue, 20 Aug 2019 20:09:51 +0000 (20:09 +0000)]
Further tests for the special null-handling on this branch.
FossilOrigin-Name:
0dbbb51f4d39cafb01d625d65c12dcb232a9c1da7ed5a9397bf55cfea1b980d2
dan [Tue, 20 Aug 2019 19:11:29 +0000 (19:11 +0000)]
Fix a problem with fts5 "ORDER BY rank" queries when the fts5 table name requires quoting.
FossilOrigin-Name:
00e9a8f2730eb7239bf7fd107c97c409e4f9fbd968510766373440a9079898eb
dan [Tue, 20 Aug 2019 17:51:13 +0000 (17:51 +0000)]
Add tests for sort-by-index cases that use IN() and non-default NULL handling.
FossilOrigin-Name:
09d660ecde723fb30f3bb3684bbb7f95825d78da6a6f33ddf57846054cd563e0
dan [Tue, 20 Aug 2019 15:47:28 +0000 (15:47 +0000)]
Do not pass ORDER BY clauses with non-standard NULL handling to virtual table implementations.
FossilOrigin-Name:
a9a82ee88d2d12209a674bd19167277aa91a6912e7a8bbf3714f90d559307fee
dan [Tue, 20 Aug 2019 14:43:01 +0000 (14:43 +0000)]
Fix a segfault that could occur following an OOM while processing a SELECT statement for which one or more of the expressions in the window frame declaration are themselves sub-selects that use window functions.
FossilOrigin-Name:
75aec4fc886c04fe098828cc03bc72c197cbf40f0a1890fe5bbb98d4fd5c3c7e
drh [Tue, 20 Aug 2019 13:49:12 +0000 (13:49 +0000)]
Add the new sqlite3_drop_modules() interface to the loadable extension
mechanism.
FossilOrigin-Name:
658bd51623787be4ca87b066a051d119f39056286e223afef3691629cf1ab0e1
dan [Tue, 20 Aug 2019 11:43:44 +0000 (11:43 +0000)]
Retain the affinity of an expression in a WHERE clause when it is transformed to a reference to an index column on the same expression. Fix for [
f043b113 ].
FossilOrigin-Name:
511da0815673ca4a176aa61dc23a8231b2ab77e8363fc184a78b6e17dba64d49
mistachkin [Tue, 20 Aug 2019 02:19:26 +0000 (02:19 +0000)]
drh [Mon, 19 Aug 2019 20:44:07 +0000 (20:44 +0000)]
drh [Mon, 19 Aug 2019 20:35:30 +0000 (20:35 +0000)]
Omit the "_except" term from the name of the new interface.
FossilOrigin-Name:
e5ba47c2d8eb9f48a0e0d325e57d0092d536f85983819634c871ebd51829f1d1
dan [Mon, 19 Aug 2019 19:59:50 +0000 (19:59 +0000)]
Fix problems with window frames that use ORDER BY ... NULLS LAST etc.
FossilOrigin-Name:
75d665a494dd7d6e77d5a80af386ee5accc0a53416d5493424dc0fef6c7b01a0
dan [Mon, 19 Aug 2019 17:26:32 +0000 (17:26 +0000)]
Prevent NULLS FIRST/LAST from being used in CREATE INDEX and other statements.
FossilOrigin-Name:
bb9767a287097a615aeb4abdba689b10e1a1c36c016c8e55905b508075e62c86
dan [Sat, 17 Aug 2019 19:58:26 +0000 (19:58 +0000)]
Add some extra tests for the lsm virtual table module.
FossilOrigin-Name:
4cb009b0f724f72eaea90e45488122f7c2a7d0caf31a8422da4060469507e921
drh [Sat, 17 Aug 2019 19:55:26 +0000 (19:55 +0000)]
Fix to the query planner for the LSM1 extension.
FossilOrigin-Name:
7496e872a1a50ac65ad04709365a43038fb015ac9c690196de3cb02ce54c2e57
drh [Sat, 17 Aug 2019 19:45:25 +0000 (19:45 +0000)]
The experimental sqlite3_drop_modules_except() interface.
FossilOrigin-Name:
0851db4d337a87f8b2d3ce2ae9f9c928b9483591ca41a9e39cc01548059b1888
drh [Sat, 17 Aug 2019 19:31:09 +0000 (19:31 +0000)]
Fix the new ability to unregister virtual table modules so that it works
for the automatic PRAGMA virtual tables.
FossilOrigin-Name:
5d6f4dfeea75c7dcd8c511545accb9eb4b405a02db034332249ba54794e313d2
dan [Sat, 17 Aug 2019 19:13:49 +0000 (19:13 +0000)]
When populating an ephemeral b-tree for the RHS of an IN(...) clause, avoid applying an affinity to a value that may be used later on for some other purpose. Fix for [
c7a117190 ].
FossilOrigin-Name:
43e8b14314d876178d487c3b519296ac1de065fdcaa70768e40d684015bceb9d
dan [Sat, 17 Aug 2019 18:16:59 +0000 (18:16 +0000)]
Add tests to ensure that this branch really does fix ticket [
f8a7060ece ].
FossilOrigin-Name:
f892066425671a8a0ac923e3ad4744677f6434a66f97b91afa8141f11f179975
dan [Sat, 17 Aug 2019 17:55:54 +0000 (17:55 +0000)]
Fix problem with DESC indexes on this branch.
FossilOrigin-Name:
b49df1fe9b7174ebc60023179e8da628c926e59df3dc01b15d4a28e17807bb97
drh [Sat, 17 Aug 2019 17:07:15 +0000 (17:07 +0000)]
Ensure the functions that appear to be constant are not factored out of
expression that originate on the right-hand side of a LEFT JOIN.
Ticket [
6710d2f7a13a2997 ]
FossilOrigin-Name:
500c9152daaf11cf69d778aa8592175f6088337c6667c59af6df3a24cd81eb0e
dan [Sat, 17 Aug 2019 15:47:32 +0000 (15:47 +0000)]
drh [Sat, 17 Aug 2019 15:27:58 +0000 (15:27 +0000)]
Activate introspection pragmas by default. The new option
SQLITE_OMIT_INTROSPECTION_PRAGMAS must be provided to keep them out.
FossilOrigin-Name:
9c4bca64fb5f635296a8d7d7c1bf2808e02ca734a9983e5cee9132f5352a9a6d
drh [Sat, 17 Aug 2019 00:53:29 +0000 (00:53 +0000)]
The SQLITE_DIRECTONLY flag, when added to sqlite3_create_function() prevents
the function from being used inside a trigger or view.
FossilOrigin-Name:
de767376987f7668b0770c4920f1532e341b5a27f797d69c0f5e92b87d036170
drh [Fri, 16 Aug 2019 22:58:29 +0000 (22:58 +0000)]
Add the ability to unregister a virtual table module by invoking
sqlite3_create_module() with a NULL sqlite3_module pointer.
FossilOrigin-Name:
31e34fa3390196cdc3178bf120224b08df5ec58fa2c77079ede6e9461a430dad
dan [Fri, 16 Aug 2019 21:07:19 +0000 (21:07 +0000)]
Add support for using indexes for some ORDER BY clauses that use non-default NULL handling. Still some problems on this branch.
FossilOrigin-Name:
81069d7196857e909c94195d67388f71bc9f832eafd9156d8c5cdddb63513b4a
drh [Thu, 15 Aug 2019 23:11:42 +0000 (23:11 +0000)]
Fix harmless compiler warnings in the TCL interface.
FossilOrigin-Name:
f17e72291f197a92b3e15e054271b997d45211a5a31ca4ea6c7fbb33026d5f1f
drh [Thu, 15 Aug 2019 21:27:20 +0000 (21:27 +0000)]
Add the SQLITE_DBCONFIG_ENABLE_VIEW option, together with a "db config"
command in the TCL interface that can access that option as well as all the
other sqlite3_db_config() boolean options.
FossilOrigin-Name:
61b4bccd2984f4c2cf50f58ef08677588e57aa7e079af07473b2e188d9ce4f52
drh [Thu, 15 Aug 2019 20:04:09 +0000 (20:04 +0000)]
Provide the SQLITE_DIRECTONLY flag for app-defined functions that prohibits
the use of those functions within triggers or views.
FossilOrigin-Name:
fc745845d8d76adc165575e2192f4176e3c28e614c72571d56f4011560499fe1
drh [Thu, 15 Aug 2019 14:35:45 +0000 (14:35 +0000)]
Ensure that the optional "sz=N" parameter that can be manually added to the
end of an sqlite_stat1 entry does not have an N value that is too small.
Ticket [
e4598ecbdd18bd82 ]
FossilOrigin-Name:
98357d8c1263920b33a3648ef9214a63c99728bafa7a8d3dd6a1241b2303fd42
dan [Thu, 15 Aug 2019 13:53:22 +0000 (13:53 +0000)]
Ensure that SQLite does not attempt to process incompatible window functions in a single scan. Fix for [
256741a1 ].
FossilOrigin-Name:
4f5b2d938194fab7627486e2ced633def2c90d9d3328e3700612feb9dbfa3d9a
drh [Thu, 15 Aug 2019 13:46:39 +0000 (13:46 +0000)]
Avoid downgrading SQLITE_CORRUPT errors detected by the schema parser into
SQLITE_NOMEM or SQLITE_ERROR errors.
FossilOrigin-Name:
b2e79f8ff0836fcc98a2df9377aad9137307c34058030ecd1b5d4ec3277ed36a
drh [Thu, 15 Aug 2019 13:17:49 +0000 (13:17 +0000)]
Ensure that the cell overwrite optimization does not overwrite the header
of the b-tree page.
FossilOrigin-Name:
4cc5694cbd69749c146679c367860952fdf3f5356426ddfd1dce470569702bc1
drh [Thu, 15 Aug 2019 00:04:44 +0000 (00:04 +0000)]
Early detection out-of-bounds page numbers on the direct-overflow-read
optimization gives consistent error messages regardless of whether or not
the optimization is enabled.
FossilOrigin-Name:
b517a52fa36df0a0854a75858b5e81861771d2e9032a5a0ad79aa76ae64130a2
drh [Wed, 14 Aug 2019 15:17:21 +0000 (15:17 +0000)]
Always check for reads past the end of the file on the in-memory journal
driver. This used to be an assert().
FossilOrigin-Name:
4d41ca7d6efbdac70890a8d4159488fc7f59bf78a550b00597b4df990c4fcaef
mistachkin [Tue, 13 Aug 2019 20:34:35 +0000 (20:34 +0000)]
dan [Tue, 13 Aug 2019 17:56:56 +0000 (17:56 +0000)]
Update test cases so that they work with ICU enabled.
FossilOrigin-Name:
408144a1832569ced8e04840f0dd36a3867405f36b13631b0f13c0f7b8a0fb01