drh
e94006eb42
Enhance LEMON to provide the ability to mark a rules as one that will never
...
reduce due to intervention of actions. Use this new capability to designate
the EXPLAIN rule as NEVER-REDUCES.
FossilOrigin-Name: 136cdefb2f7b582ff1771ac7f9e733dc24c357605526cbfb1834937697c8a922
2019-12-10 20:41:48 +00:00
drh
8e8c88964c
Use a statement journal on a CREATE VIRTUAL TABLE statement in case the
...
VCreate opcode fails.
FossilOrigin-Name: aa3b0eb8c3438ddd3b660bc6bce4b1f4a0e3b5ec897079445231ee1b61210d6a
2019-12-10 18:10:12 +00:00
drh
c075c505f3
Fix parser bugs: require a semicolon after an EXPLAIN command.
...
FossilOrigin-Name: 707a058a22bd00ef14431cee0d02048cf1be745c0ef5254eda76c325435738ff
2019-12-10 15:05:09 +00:00
dan
db5ed35609
Avoid a buffer overread in fts5 that could occur when parsing corrupt configuration records.
...
FossilOrigin-Name: 355afd77df21a2265871ca6d075f26b1fa121c7c2682cf512281944ff0c2186d
2019-12-10 03:40:11 +00:00
drh
b5f6243f6d
Set the affinity of regular columns prior to computing the values of
...
generated columns. Ticket [d7c3f125c925c522]
FossilOrigin-Name: d47d66e3d360d8aa6203a855228d2bc40d9a00d69c15f5066b7632d8fb1ed2cc
2019-12-10 02:48:41 +00:00
drh
0a8764ad7a
Rename a local variable to avoid masking a function parameter and thus
...
causing a harmless compiler warning.
FossilOrigin-Name: f065cf003bd2a3a580cb5b9fa2eacd8be075fe8c2bbc5688e9a9406abbfb3804
2019-12-09 19:44:45 +00:00
drh
2bc5cf9ae9
Add a NEVER() to the ALTER TABLE fix in check-in [1d2e53a39b87e364]
...
FossilOrigin-Name: c7309ed3c7588c7e51e09418bf5cfd4611539b44c39cef9ed4ae0e385bae7625
2019-12-09 19:29:10 +00:00
drh
0824d5b9a5
The previous check-in was not quite correct, and introduced a new problem
...
with the USING clause. Use this version instead.
FossilOrigin-Name: ed28aaa4851202111a502f883ca06359d89b25bba4055c29d7bce2b501cfcc68
2019-12-09 18:22:17 +00:00
drh
926f796e8f
Ensure that the SrcList_item.colUsed field is set correctly (set to have a
...
1 for all columns of the table) when a generated column appears in the USING
clause of a join.
FossilOrigin-Name: 1923efb283e8840fa7436eb20b9d2174ef7cace1690d3b97b572a0db2048b8e3
2019-12-09 17:14:48 +00:00
drh
ebd70eedd5
Fix the NOT NULL verification logic in PRAGMA integrity_check so that it
...
works for generated columns whose value is the result of a comparison operator.
Ticket [bd8c280671ba44a7]
FossilOrigin-Name: f3b39c71b88cb6721f443de56cdce4c08252453a5e340b00a2bd88dc10c42400
2019-12-09 15:52:07 +00:00
drh
7a9698456d
Fix a gramfuzz find. If a partial index that does not reference any column
...
of its table is used by an UPDATE statement in one-pass mode, then avoid the
use of OP_DeferredSeek since the seek might not be resolved prior to the
OP_Delete and OP_Insert that implement the UPDATE.
FossilOrigin-Name: e3398c5ffb060b2b26334b8598e2c63953741e2d6f5124dbd6bdfc8e94742539
2019-12-09 14:34:37 +00:00
dan
38096961c7
Avoid infinite recursion in the ALTER TABLE code when a view contains an unused CTE that references, directly or indirectly, the view itself.
...
FossilOrigin-Name: 1d2e53a39b87e364685e21de137655b6eee725e4c6d27fc90865072d7c5892b5
2019-12-09 08:13:43 +00:00
dan
c19e22f397
Fix possible null pointer dereferences in the fts5_expr() scalar function.
...
FossilOrigin-Name: c5d44143599f3fe98492b2b900fa3d77925c7be545096251055ceeab899a41f1
2019-12-09 02:20:37 +00:00
drh
bf9d0996b9
Fix incorrect column-usage accounting associated with generated columns
...
and added by check-in [6601da58032d18ae]. Fix for ticket [b92e5e8ec2cdbaa1].
FossilOrigin-Name: 9d75e1ccc72e9f536f45df3b24e9ecd25076cc1f7cf16b806b19e0e1b68e8326
2019-12-08 00:06:39 +00:00
drh
29cdbadf8a
Correctly deal with multi-row VALUES clauses that contain window functions.
...
FossilOrigin-Name: 26d991f214db143976e2593d3564b5003eb3539a2728d1a0ccae2a2accece76f
2019-12-07 13:42:47 +00:00
drh
c7a046e282
Ignore type affinity for auxiliary columns in RTREE as it is too error-prone
...
to try to parse out the type from other constraints.
Ticket [8bf76328ac940d52]
FossilOrigin-Name: 7fa664ea0ea1e0283a9af50c9ff8dd360ee6042f9e491a136f53d9bcbbc9c7ef
2019-12-07 12:13:54 +00:00
drh
7fe2fc0dcb
Fix a problem with foreign keys and generated columns discovered by
...
Manuel Rigger.
FossilOrigin-Name: 27c0fdab1ba4d4993b164eb4b777c63e82aa247c3fa406121dc8ed94970a0b35
2019-12-07 00:22:18 +00:00
drh
5102cf8df5
Early detection and reporting of too few columns in an rtree CREATE VIRTUAL
...
TABLE statement.
FossilOrigin-Name: ef73107f475e40e6bdd8b722e96992070f81fd2b7a3cb718ec8f251c89ca3e81
2019-12-06 19:07:44 +00:00
drh
0a64ddbe76
In the rtree extension, actively suppress extra tokens on the column names,
...
and be pedantic about column affinities. Ticket [367a86e28859f1ff]
FossilOrigin-Name: 97fb5a72f91a44d579466e67c33aa862384c4d1c95c2010cf4ae9dbd172bbcfb
2019-12-06 13:10:29 +00:00
drh
39593e4f09
The check-in [b7810062ec2489e1] was not quite right in that it allowed an
...
oversized shift operation (which is UB in C) on some obscure inputs. OSSFuzz
found the problem for us overnight.
FossilOrigin-Name: 62f2235adf796c72882b26313489cf49804ec3ec4972e0eee5034176cbb07f84
2019-12-06 11:48:27 +00:00
drh
e5748a5502
Further enhancements to RTREE, following up to check-in [f898d04cf272ef01]
...
so that constraints are allowed to be compared to strings that look like
numbers. Ticket [aa573a787b8f1fdf]
FossilOrigin-Name: 32772dfd50b602c049d8c30bc28cde60a18b7495a997d728081f689ff417c956
2019-12-06 01:38:24 +00:00
drh
c6b24ab1b1
Do not allow UPSERT of a view.
...
FossilOrigin-Name: ebf897e861c19e214c57f1e73841b505182202cc8d7d39e24d5a1e5625e26b4a
2019-12-06 01:23:38 +00:00
drh
b6c947251b
Fix to the rowvalue logic that avoids disabling rowvalue inequality
...
contraints on a virtual table when the virtual table sets the omit flag.
The logic has been incorrect since row-values were added. However, this
does not come up often as very few virtual tables implement inequality
constraints using the omit flag. Ticket [f096d191b6641daa]
FossilOrigin-Name: b7810062ec2489e1c5ca6638dbeb0892e4ce376c5c1834a31d1a332ebab8a871
2019-12-05 21:46:23 +00:00
drh
6c903845cd
Documentation update: Clarify that the sqlite3_index_info.aConstraintUsage.omit
...
flag is a hint only and that the code generator is not obligated to follow
the hint.
FossilOrigin-Name: 7d3e3f6e7e55da41bf776fab094df54fb6a33b2967881d3184cf854c8a637518
2019-12-05 18:29:52 +00:00
drh
05fbfd827c
Additional debugging information printed with the ".wheretrace 0x100" option.
...
No changes to normally delivered code.
FossilOrigin-Name: fc72ec52c92ca6a953e765b48e21d52021fdb23a2cd84f737da4e43c642f6a5d
2019-12-05 17:31:58 +00:00
drh
cb224ab139
Make sure the rowid of an RTREE virtual table has integer affinity.
...
Ticket [9fe487ba3c064b4e]
FossilOrigin-Name: 7ae8c0d52f6aa7f27537216f85456ef49dade040366cfb250c789206ecd4dc5a
2019-12-05 14:42:26 +00:00
dan
e6dc1e5b70
Fix a problem in ALTER TABLE that could occur if an index, view or trigger in the schema features an expression of the form ((SELECT ...) IN ()) where the SELECT statement uses a CTE.
...
FossilOrigin-Name: 7e5ad8e0ab7ee91a5ccb19a9654d6a036233f74d2fdc45f7315feb3d9d035fd4
2019-12-05 14:31:43 +00:00
drh
348d7f64f2
Be strict about type enforcement on rowid look-ups in the RTREE extension.
...
Ticket [30e2c183b6b356e4]
FossilOrigin-Name: d43e0efb9642037dd751cfed13438e71cfceb50e14a0ec603880c6c3be2e93b1
2019-12-05 13:34:13 +00:00
drh
674a9b3425
Enhance the RTREE extension so that it give correct query results even if
...
the query uses non-numeric constraints. Ticket [a55ab6d97d01ecbc]
FossilOrigin-Name: f898d04cf272ef0130dcae146cb86d8630b10a6f19aecfc2fa70e97e082bd51c
2019-12-05 00:44:47 +00:00
drh
a634c9e653
Window functions are never constant.
...
FossilOrigin-Name: 35f0b5a8c7921f7419eeb11be8201fd6988047042fcaeffa297fc322bc480c1f
2019-12-04 19:45:52 +00:00
drh
d63b69b8a2
Ensure that an ALWAYS() in the rename logic really is always true, even
...
for faulty inputs.
FossilOrigin-Name: 54410f0e7710542d5159d0449898598d2b7f7676bfd993644ca47da1bf1fcdac
2019-12-04 15:08:58 +00:00
dan
8f4076223d
Fix an assert() failure that could occur in ALTER TABLE code when the schema contains a view that uses a CTE.
...
FossilOrigin-Name: 75b04a4b0d2e65bfcd02cf4e0b6d8f1954957c590814a9b8f9a9ee2adc2ec022
2019-12-04 14:26:38 +00:00
dan
8aa706e748
Fix a buffer overread that could occur in fts3 with corrupt %_stat records.
...
FossilOrigin-Name: e01fdbf9f700e1bd9dd5283c65547d10d26ce4f4506d3cfef9e1087aecdc2305
2019-12-04 03:46:50 +00:00
drh
f68bf5fbe6
Fix an incorrect NEVER() macro.
...
FossilOrigin-Name: 96b6a76da09a94182414ec1a56da91728c37329d2b55f889e433054ca21605ce
2019-12-04 03:31:29 +00:00
dan
fcc057db25
Fix a double-free that could occur when a component of a compound SELECT with an ORDER BY clause uses named window definitions.
...
FossilOrigin-Name: 92893b7980cbb0c6e26bc0b21390a717193205c9897fea5f26476462928897f9
2019-12-04 01:42:07 +00:00
dan
0232dade79
Avoid a crash that could occur when a database containing a table with a temp trigger that has the same name as a temp table is detached.
...
FossilOrigin-Name: c4cb9708d48ead10ee9543f86878be8382cd6e850950d5384c95254bac4a8d6e
2019-12-03 03:34:06 +00:00
drh
d79967adbe
Avoid a harmless zero offset of a null pointer in FTS3, so as to not provoke
...
unnecessary warnings from run-time checkers.
FossilOrigin-Name: 85d95abec4a596eb3ffd2ea19b4067dc1a6970264222ed5d69e75764ac21597c
2019-12-03 03:31:11 +00:00
drh
22e6f67c51
Avoid computing a zero offset of a null pointer, which though this is
...
technically harmless, is upsetting to pedantic run-time checkers.
FossilOrigin-Name: 3ce804e99bbef83d49ec309157448a7c1422725606516cef904e6122aadd3922
2019-12-03 02:51:50 +00:00
drh
ca7a26b5a1
Do not allow a term in the WHERE clause of the query to qualify a partial
...
index on the right table of a LEFT JOIN. Ticket [7f39060a24b47353]
FossilOrigin-Name: 4066a34da7bcdcece6c438c27f3a11bc49b8c8373b7e1603f30f6225e2bc800a
2019-11-30 19:29:19 +00:00
drh
61cb4ed7f1
Add comments in the parse.sql file to help demonstrate how rules are
...
encoded.
FossilOrigin-Name: 2c4f714892327a1a9a303267b1f9685e310cca5dcea9c61287d95e26291b0506
2019-11-29 13:01:57 +00:00
drh
1417c2f77f
Fix the parse.sql output file so that it is readable into a database where
...
foreign keys are enforced.
FossilOrigin-Name: 3a82c554c3bde4640df6865686f8f70e2c1e07c581fed4772b6b0a8ec1b10bb6
2019-11-29 12:51:00 +00:00
drh
2ecf928ea9
More details on the comment justifying the aleged data race in the WAL-mode
...
checkpoint logic.
FossilOrigin-Name: 0fab65c79f675c825ed7e85c82b65ce6f990c9d0796ebb3886942d241df7b268
2019-11-27 20:40:44 +00:00
drh
2bbcaee833
Fix various documentation typos suggested by Mark Benningfield.
...
No changes to code.
FossilOrigin-Name: 08f09dc4f986a27f4e4e69f8226dbfaf0cfe1269cefc2830bf0fbef7b9bbda48
2019-11-26 14:24:12 +00:00
drh
51690f26bc
Fix to check-in [5d9a369301a65f32] so that it compiles without SQLITE_DEBUG.
...
FossilOrigin-Name: fefe2d046725254367f9f82a8c8cb137e8b75dbbf4bc48debf0649479ff2f0c2
2019-11-26 11:10:59 +00:00
drh
fe03dac236
Add the new -S option to the lemon parser generator to cause it to output
...
SQL that describes the input grammar.
FossilOrigin-Name: 4dbd398d640852d4a696d68c72ee039968023d402a8053b5e6b4ef1d75e982a8
2019-11-26 02:22:39 +00:00
dan
597f1eb195
Fix an assert() in fts3 that could fail due to corrupt database records.
...
FossilOrigin-Name: 5d9a369301a65f320a0696fcf1f062ca5976ef34350590c07aecf5335c66d872
2019-11-26 02:03:16 +00:00
dan
baa3458920
Modify journal3.test so that it can handle Tcl command "file attr <file> -perm" returning octal values in either "00755" or "0o755" format.
...
FossilOrigin-Name: b0b655625cf491c832a259d29a67660b8d5943c201617900a83d0660b2673377
2019-11-25 04:15:33 +00:00
mistachkin
fe293347ac
Minor enhancements to the TclKit download tool.
...
FossilOrigin-Name: 75e31b1d56781fc4d28aea6c7f1393a18fd34870a5beb92df81c088d61351b4a
2019-11-25 00:07:03 +00:00
drh
a2f142d079
Abort the window function tree rewrite early following an OOM.
...
FossilOrigin-Name: d66f95a51530259ab48f78c9f91acc38055caf338b6fee846b99a8c077466e95
2019-11-23 16:34:40 +00:00
dan
62be2dc753
Avoid evaluating PARTITION BY or ORDER BY expressions multiple times for window function queries that use multiple window functions with the same window-definition.
...
FossilOrigin-Name: 57070c68bbe15fc1d19a765182432e844c082909bdbc63b58fd86b96e2c521dd
2019-11-23 15:10:28 +00:00