drh
6ee3fa87fd
Fix an unreachable branch in sqlite3ParserFallback()
...
FossilOrigin-Name: e059178b47109caee2c2211b2db6e594c014af636677118a64e10edf01ac017d
2019-08-28 11:49:45 +00:00
drh
010bdb4c79
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
2019-08-28 11:31:11 +00:00
drh
2e51716b15
Increase the size of the yy_lookahead table so that it is never necessary to
...
down bounds checking on the index.
FossilOrigin-Name: bafd872398e58766e996963372c7acc03a1e20a6d39a3867ca45d3ea0ed2ac1d
2019-08-28 02:09:47 +00:00
dan
8085d53d3c
Add support for "ORDER BY ... NULLS FIRST" and "ORDER BY ... NULLS LAST". Use this to fix ticket [f8a7060e].
...
FossilOrigin-Name: 94085fb3e756bc984237b74b6e29c68462ad860870c64dcb5124feaeec387660
2019-08-27 19:59:21 +00:00
drh
e893759cac
The ALWAYS() added by the previous check-in was incorrect. Take it back out.
...
FossilOrigin-Name: 336235db2b1167cdb2feb64b47eb6368c97c43ee9641b7bfccc5775a41dd0d0e
2019-08-27 17:59:01 +00:00
drh
7ec796d002
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
2019-08-27 17:28:05 +00:00
drh
790b37a240
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
2019-08-27 17:01:07 +00:00
drh
6397a78b2b
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
2019-08-27 10:05:45 +00:00
drh
512e46a74c
Merge in recent fixes from trunk.
...
FossilOrigin-Name: ad816d01d4bd3908ff2c574d79d1a29b6d732df308f2f1b1cdf7c0bc7c1bd7cf
2019-08-26 20:41:33 +00:00
dan
d790c9a161
Tweak the shell tool ".recover" command so that it can recover rows that consist of a rowid and no fields.
...
FossilOrigin-Name: 279ac7fdec0b1409cd400b7b093f89089d93c49f596f378c6a3032434a85bf83
2019-08-26 14:57:58 +00:00
drh
554a9dc78a
Improved detection of number of column mismatch for vector assignment
...
in UPDATE statements. Ticket [78acc9d40f0786e8]
FossilOrigin-Name: bd4bda73df3794eef424eb13e08fc7cc54347d1ac69febaeec41f6b6cb4a42bc
2019-08-26 14:18:28 +00:00
drh
d86fe44ab5
Fix typo in a comment. No code changes.
...
FossilOrigin-Name: d0cc06d8a30444125e5655f6587a6355471c3447c08a2e5f7a046a4ed5cc5f09
2019-08-26 13:45:49 +00:00
drh
e2754c1fba
Enforce 80-character line discipline in the CLI. Minor improvements to the
...
CLI built-in help.
FossilOrigin-Name: 9690013a00d73a8047b25149ded50d20c74b5c62c0725eec50ed8477688e58a0
2019-08-26 12:50:01 +00:00
dan
666a42ffb3
Minor performance improvement for balance_nonroot().
...
FossilOrigin-Name: d7434cae3edc321e2f1f8d340a0e656b1613b736f8400fb271a0e80f59401b9e
2019-08-24 21:02:47 +00:00
dan
298680d15a
Fix a potential buffer overrun in fts5 caused by corrupt database records.
...
FossilOrigin-Name: 156d612800a7282fe0ebb20feb31d3fd577f4ab60fab8c00940c87143997aefb
2019-08-24 17:11:29 +00:00
drh
ee37f8b0a3
Fix the built-in edit() SQL function in the CLI so that it works with
...
zero-length blobs.
FossilOrigin-Name: e32490128684cfeeb8213baecc78a7942b8fb63d00e375edd965bf236faeed18
2019-08-23 23:05:32 +00:00
dan
ee6c5e5ae7
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
2019-08-23 20:33:01 +00:00
drh
a31d3554c5
Revise the VDBE comments for NULL-scan so that they also work make
...
sense when reading a NULLS FIRST plan.
FossilOrigin-Name: bfe793780fa6fc7a1e7d0ee60606dda272985de9573887dca118e9510fc609f2
2019-08-23 17:09:02 +00:00
drh
5f6a4ea2e2
Additional simplifications of the WHERE loop code generator logic for
...
NULLS LAST.
FossilOrigin-Name: 1383680d927d7d703933be7653c0019199845e7f7e82bcc76d9ca3808093e9d8
2019-08-23 17:00:22 +00:00
drh
0086e07865
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
2019-08-23 16:12:20 +00:00
drh
ec3dda5b11
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
2019-08-23 13:32:03 +00:00
drh
74e1b861ad
Extra VDBE comments in the NULLS LAST logic provide landmarks to help
...
understand the EXPLAIN output.
FossilOrigin-Name: 649b08ead50f10a9ec0357a5e1ed020195d9f93be61ef703ea036a8e53f07a34
2019-08-23 13:08:49 +00:00
drh
505ae9def8
Add additional VDBE coverage marcros.
...
FossilOrigin-Name: d3531f5be7d3769689e2cd8bdc9bab5608759de027d44cc123996f32a4a89583
2019-08-22 21:13:56 +00:00
drh
a677eecad3
Merge fixes from trunk. Also fix a reference to the KeyInfo.aSortOrder field,
...
which should now be KeyInfo.aSortFlags
FossilOrigin-Name: 63e625c8eb06720eef30573aa562e38c90d228a9cf493f8bb59f09e50f0e3168
2019-08-22 19:35:24 +00:00
drh
0d950af311
Fix the likely(), unlikely(), and likelihood() functions so that they have
...
no affinity, just like any other function.
Ticket [7e07a3dbf5a8cd26]
FossilOrigin-Name: 44578865fa7baf9760e355691ca9ce753295aaba7a4ee0bba29d4f85d9335bab
2019-08-22 16:38:42 +00:00
drh
af8664020a
Fix a false-positive in sqlite3ExprNeedsNoAffinityChange().
...
Ticket [ac184eb571d5e6e0]
FossilOrigin-Name: e62eddbb048cbc2c15cb8eeb5b7a907e7cb08c21a27ebba96a069f62dbcb0f30
2019-08-22 11:11:28 +00:00
drh
3e36480232
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
2019-08-22 00:53:16 +00:00
dan
f236b21f4b
Add missing VdbeCoverage() macros to new code.
...
FossilOrigin-Name: b1cbcdc6eb42cca0c42a05e0d6ba4c6c7f09adff0c59ecfc5b434a94dec07a41
2019-08-21 19:58:11 +00:00
dan
37874d7dcc
Disable broken test case in expert1.test.
...
FossilOrigin-Name: 73e30c2e92ccab274ff7cee48511c461de148786bb9d338921c1ecb193822282
2019-08-21 17:46:34 +00:00
dan
2ebb550824
Update this branch with latest trunk changes.
...
FossilOrigin-Name: 6153bcf41a9aa0497f8210311c99ac23846223068f2b6a3a1c2d9dec7673c7e1
2019-08-21 15:41:50 +00:00
dan
f7c92e82d2
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
2019-08-21 14:54:50 +00:00
dan
6fcb9f3ad9
Fix a broken assert() in the fts3 snippet code that was failing for queries containging more than 64 phrases.
...
FossilOrigin-Name: 4c01e0170e113ad052b6c3980beb4be9f1dc03fb3cf34132b90e8b82b23f654e
2019-08-21 11:31:48 +00:00
dan
546738f855
Further tests for the special null-handling on this branch.
...
FossilOrigin-Name: 0dbbb51f4d39cafb01d625d65c12dcb232a9c1da7ed5a9397bf55cfea1b980d2
2019-08-20 20:09:51 +00:00
dan
35fb866ea3
Fix a problem with fts5 "ORDER BY rank" queries when the fts5 table name requires quoting.
...
FossilOrigin-Name: 00e9a8f2730eb7239bf7fd107c97c409e4f9fbd968510766373440a9079898eb
2019-08-20 19:11:29 +00:00
dan
2a0c16f276
Add tests for sort-by-index cases that use IN() and non-default NULL handling.
...
FossilOrigin-Name: 09d660ecde723fb30f3bb3684bbb7f95825d78da6a6f33ddf57846054cd563e0
2019-08-20 17:51:13 +00:00
dan
4fcb9caa60
Do not pass ORDER BY clauses with non-standard NULL handling to virtual table implementations.
...
FossilOrigin-Name: a9a82ee88d2d12209a674bd19167277aa91a6912e7a8bbf3714f90d559307fee
2019-08-20 15:47:28 +00:00
dan
4780b9ad46
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
2019-08-20 14:43:01 +00:00
drh
95da9d5d46
Add the new sqlite3_drop_modules() interface to the loadable extension
...
mechanism.
FossilOrigin-Name: 658bd51623787be4ca87b066a051d119f39056286e223afef3691629cf1ab0e1
2019-08-20 13:49:12 +00:00
dan
b6ce71bd26
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
2019-08-20 11:43:44 +00:00
mistachkin
3722b3abf1
Fix a typo and a harmless compiler warning.
...
FossilOrigin-Name: ec4c63e00c957f98d61ddc1b9d20406c7e1072d6ab0c12ac6939db6c63d90cb8
2019-08-20 02:19:26 +00:00
drh
b6e0286c49
Add the sqlite3_drop_modules() interface.
...
FossilOrigin-Name: e2c6fed8f84929ed51a4e876bb09c85ac4b86a2e4cf0832a7da724bb9f4df5bf
2019-08-19 20:44:07 +00:00
drh
8c754a3613
Omit the "_except" term from the name of the new interface.
...
FossilOrigin-Name: e5ba47c2d8eb9f48a0e0d325e57d0092d536f85983819634c871ebd51829f1d1
2019-08-19 20:35:30 +00:00
dan
ae8e45cb0c
Fix problems with window frames that use ORDER BY ... NULLS LAST etc.
...
FossilOrigin-Name: 75d665a494dd7d6e77d5a80af386ee5accc0a53416d5493424dc0fef6c7b01a0
2019-08-19 19:59:50 +00:00
dan
9105fd5189
Prevent NULLS FIRST/LAST from being used in CREATE INDEX and other statements.
...
FossilOrigin-Name: bb9767a287097a615aeb4abdba689b10e1a1c36c016c8e55905b508075e62c86
2019-08-19 17:26:32 +00:00
dan
dac7e69dc2
Add some extra tests for the lsm virtual table module.
...
FossilOrigin-Name: 4cb009b0f724f72eaea90e45488122f7c2a7d0caf31a8422da4060469507e921
2019-08-17 19:58:26 +00:00
drh
5976b2c805
Fix to the query planner for the LSM1 extension.
...
FossilOrigin-Name: 7496e872a1a50ac65ad04709365a43038fb015ac9c690196de3cb02ce54c2e57
2019-08-17 19:55:26 +00:00
drh
5df8428069
The experimental sqlite3_drop_modules_except() interface.
...
FossilOrigin-Name: 0851db4d337a87f8b2d3ce2ae9f9c928b9483591ca41a9e39cc01548059b1888
2019-08-17 19:45:25 +00:00
drh
87ca8067af
Fix the new ability to unregister virtual table modules so that it works
...
for the automatic PRAGMA virtual tables.
FossilOrigin-Name: 5d6f4dfeea75c7dcd8c511545accb9eb4b405a02db034332249ba54794e313d2
2019-08-17 19:31:09 +00:00
dan
c324d44690
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
2019-08-17 19:13:49 +00:00
dan
8328369740
Add tests to ensure that this branch really does fix ticket [f8a7060ece].
...
FossilOrigin-Name: f892066425671a8a0ac923e3ad4744677f6434a66f97b91afa8141f11f179975
2019-08-17 18:16:59 +00:00