Commit Graph

20732 Commits

Author SHA1 Message Date
dan
6488271f05 Change the parser on this branch to more closely match trunk. This saves a few more cycles.
FossilOrigin-Name: be01b801fbc258f0ab9542130cec12a5ea5e2d0bf087684a9eda909ad459c211
2019-07-11 18:43:33 +00:00
dan
8117f113bc Minor performance improvement in sqlite3ExprDeleteNN().
FossilOrigin-Name: bcc8b38ac75b731a4cd2873ab83f423be036467a511b617c779869de9bbb5383
2019-07-10 20:16:53 +00:00
dan
1efcc9dd96 Another very small performance improvement.
FossilOrigin-Name: 7a1e30a17f57ca006dd84b6f97b0c7811bf4c6da4b02903452ffc4bc363cab9b
2019-07-05 19:10:41 +00:00
dan
b28c4e564a Minor tweak to patch on this branch to reclaim some cycles.
FossilOrigin-Name: 81eed055de856068109a7e332cca0c3ff1120ebe2bfa5ed6383b165c726e0a7c
2019-07-05 17:38:55 +00:00
dan
16e12c573d Add tests for the FILTER clause. And a bugfix.
FossilOrigin-Name: 28aa1702f7f0334abd1b30e7aa48ea3679539b11bfbba32bc9f0d6049cf18a7b
2019-07-03 18:31:20 +00:00
dan
6ba7ab0d25 Experimental implementation of FILTER clause for aggregate functions.
FossilOrigin-Name: 1f1ae2d6ac8dcbb62e5aa3dc17bc67d559cb565fc0d0a8c00a596075d35f8130
2019-07-02 11:56:47 +00:00
drh
00a6153faf Use the OP_Sequence opcode for generating unique rowid values for an
autoindex on a co-routine implementation of a subquery.

FossilOrigin-Name: eab4297577e4d325fed4757867fc77860de7448998d86f098c8a50272e17d35e
2019-06-28 07:08:13 +00:00
dan
855b5d144a Ensure that when an ephemeral cursor is reopened with a second invocation of to OP_OpenEphemeral, the sequence counter is reset and the cache marked as stale. Fix for [9cdc5c46].
FossilOrigin-Name: 5fd20e09a522b62a529cf4d76fbdf0a09426f67ffa30430cac6b81ebf32ba43e
2019-06-26 21:04:30 +00:00
dan
07312a6b06 Fix a typo in an option name for the .dbconfig command in shell.c.in: s/wriable_schema/writable_schema/
FossilOrigin-Name: 1c58522e49cd91426bca7efccf0d99e0f2803dcd5991ae5d56166fc5510e4c62
2019-06-21 14:05:27 +00:00
dan
fe9a832e80 Fix a problem with handling with handling quoted path elements in extension functions json_set() and json_insert() reported on the mailing list.
FossilOrigin-Name: 45bfcb88e71451a656982e217375e257fc8e68374349c2984be1266bf86fb8cf
2019-06-17 14:50:33 +00:00
drh
d9678890a9 New sqlite3_db_config() options:
SQLITE_DBCONFIG_LEGACY_ALTER_TABLE,
SQLITE_DBCONFIG_DQS_DML, and
SQLITE_DBCONFIG_DQS_DDL.

FossilOrigin-Name: a61db8ff6713d66778a0500ca4049229c081a3ae95991f05eba09729434444b3
2019-06-17 14:13:30 +00:00
drh
d0ff601c62 Improved interface to double-quoted string literal enabling/disabling.
FossilOrigin-Name: 923cfd53fcff2fcb91530bf819d2ecb0eda3f6a27dae29c7460f9ce3a3ffce7b
2019-06-17 13:56:11 +00:00
drh
cf175c193b Avoid transforming TK_COLLATE or TK_UNLIKELY Expr nodes to TK_REFERENCE.
Instead, transform the uppermost Expr node in the expression tree that
is not of this type. Fix for [e1e07ef2].

FossilOrigin-Name: 54110870487f78013ab1b554413c18baa2bdc07d979bc65c110f32d30c3b53fe
2019-06-16 14:56:41 +00:00
dan
069d1b1faf Avoid transforming TK_COLLATE or TK_UNLIKELY Expr nodes to TK_REFERENCE. Instead, transform the uppermost Expr node in the expression tree that is not of this type.
FossilOrigin-Name: ba7870e292919cf6c2f4b65b63fb0420ba2718eb0a797e0ba5302eec551a4238
2019-06-16 08:58:14 +00:00
dan
e3664dcb48 Fix minor problems in the test code in test_demovfs.c.
FossilOrigin-Name: ca4ddfefc1be1afbf366d87c47f0dd1122350d7ab34ba60020c5babb64a654a4
2019-06-15 15:32:37 +00:00
dan
44c99ecf9c Add extra test case for one of the problems fixed by the previous commit.
FossilOrigin-Name: 0bbceebb126c94b5159079a341fa16e8424b7f2f6b9364561516964e871fb6e0
2019-06-15 15:27:37 +00:00
drh
bdf4cf0b90 Ensure that sqlite3RenameExprUnmap() does an unmap of the result set alias
names in subqueries when ALTER TABLE fails because of a syntax error in a
trigger.

FossilOrigin-Name: d3b6f1665f6fb5fc5cf1c0864d779d0b24746ada530f755c7b6ff34766bd2188
2019-06-15 15:21:49 +00:00
drh
0a6873bfd6 Add SQLITE_DBCONFIG options LEGACY_ALTER_TABLE, NO_DQS_SCHEMA, and NO_DQS.
FossilOrigin-Name: 1fad20925efa70d0c242e9cba8fa55456fb07a81229c1068da84c6e27d0c0be8
2019-06-14 21:25:25 +00:00
drh
c164cc992f Deprecate the SQLITE_ALLOW_COVERING_INDEX_SCAN compile-time option when it is
turned off.  This probably will impact no-one.  If it does, they will get an
error message instructing them to contact developers, so that we can get
feedback that somebody is actually using this feature.  Start-time disabling
of covering index scan is not affected.

FossilOrigin-Name: 23e49f9984f74f242602c6e56bfc645585c7c86bcdd585c322ab0d8e20958d86
2019-06-14 17:37:39 +00:00
drh
821afa44c1 Fix the implementation of the built-in RTRIM collating sequence so that
it works for control characters at the end of the string.
Ticket [f1580ba1b574e9e9]

FossilOrigin-Name: 86fa0087cd1f5c79ed51b99a226ec2eef5b0fa0a23981d469bec0e02fadf2a68
2019-06-14 13:24:46 +00:00
drh
060b7fa974 Refactor the LIKE optimization decision logic so that it uses
sqlite3AtoF() on both boundary keys to determine if the optimization can be
used when the LHS is something that might not have TEXT affinity.
Ticket [ce8717f0885af975].  See also [c94369cae9b561b1],
[b043a54c3de54b28], [fd76310a5e843e07], and [158290c0abafde67].

FossilOrigin-Name: b4a9e09e60213ccff925d09f0b6e549e2a3e3862856c710f108779e2867dec76
2019-06-14 12:28:21 +00:00
drh
4eb4e4fe7e Add a new requirement mark on the ctime.c code.
FossilOrigin-Name: c4b405687b010ee20ec02c42913a0540909d0155c88a4a56194fda99c704279e
2019-06-13 16:14:53 +00:00
drh
e25007602b Do not use the %lld printf conversion in the platform printf() as some
legacy platforms do not support it.

FossilOrigin-Name: f8696b60eec0dcacfe92d9a31cbf1436d674140e5447de0cd1c2f52bff6c2be4
2019-06-13 14:07:41 +00:00
drh
4245e0456d Fix a minor error in a test script, and harmless compiler warnings in the CLI code.
FossilOrigin-Name: eaa34626e497d3af132dd8f13eddbbda89365d369ed43212a5f788175b3d6198
2019-06-13 13:52:46 +00:00
drh
0ce974d122 Adjust requirements marks and add new requirements tests.
FossilOrigin-Name: ebb81dad1f43dac4636cd44d4055d1d4b198c675f73e23c5a2d8d992ae27fe1f
2019-06-12 22:46:04 +00:00
drh
13d0402077 As a special case, casting '-0.0' into numeric should yield 0.
Fix for ticket [674385aeba91c774].

FossilOrigin-Name: 491f0f9bbddb6302536d99abd1ea481fd747ddcf6c6eaaacc0338d147b119081
2019-06-12 20:51:38 +00:00
dan
6ece353f2d Handle expressions like "expr IS TRUE COLLATE xyz" in the same way as "expr IS TRUE". Fix for [4d01eda8115b10d1].
FossilOrigin-Name: 5c6146b56a75a94f4baa10e95407c54dd0b9314a57a8702a4b96b15c4d7ac48c
2019-06-12 13:49:32 +00:00
drh
a7d6db6ac0 The affinity of the unlikely() function and its cousins should be "none".
Ticket [0c620df60bffd9ef]

FossilOrigin-Name: 614ecb0af47038848e8ba2aed6b92db6f33ddc4aea6361795dbde440380f5a35
2019-06-11 21:02:15 +00:00
drh
42be2ad30b Make sure the affinity of the RHS of an IN operator does not affect the
outcome even if the RHS expression contains a COLLATE clause.
Ticket [57353f8243c637c0]

FossilOrigin-Name: 0f748fe58bbbb7ce3f30303da25ec811b2bbce249549aa9c7927979ac5b38013
2019-06-11 18:07:53 +00:00
drh
2c3f46500f Mark an unreachable branch with an ALWAYS macro.
FossilOrigin-Name: d4755aca4b435eed62b54af84013f7f176d3fa5b7b1c243555d59de5749fcde5
2019-06-11 16:43:58 +00:00
drh
66cc2ca83a New test case in fuzzdata8.db.
FossilOrigin-Name: e96641f0be7d4454215459b0a95cf1c46ba0133e46d0bae22269741c8f4e5b44
2019-06-11 16:07:39 +00:00
drh
fa685947d8 Off-by-one error in the CAST to NUMERIC logic.
FossilOrigin-Name: 25b89630206fdbb41c756e98f99baa711d35a8c226697a92339d0fe7e8b3652a
2019-06-11 16:06:05 +00:00
dan
0b277a980a Have the ALTER TABLE code handle the case where an entire expression that includes a sub-select is excluded from a view, trigger or index.
FossilOrigin-Name: f2c8179f3c0b77f10da3f9b0771db4dec30d0bbf0b7f4751ce439bfb08da8f6f
2019-06-11 12:03:10 +00:00
drh
8e34e4061b Add the new sqlite3ExprUnmapAndDelete() function and use it in place of
separate calls to sqlite3RenameExprUnmap() and sqlite3ExprDelete().

FossilOrigin-Name: 36ea13e0a851a749c9ef292377ecd82dbd4797d38df907b362487fa234c98ca5
2019-06-11 10:43:56 +00:00
drh
b854b76733 The ALTER TABLE command should not attempt to rename objects that are
contained within an expression tree that has been optimized out because
it is the other branch of an "AND false" expression.
Ticket [533010b8cacebe82]

FossilOrigin-Name: 04bd5cb73287f926f1ecf578998fa6ce1379474e86918c692eae5778d0817cef
2019-06-11 02:43:22 +00:00
drh
a753d40039 Fix repeated test numbers in the altertab2.test file.
FossilOrigin-Name: e82f235e7201a420149847cda630ac6f2fce5e3a4577b0ea4793f430d3dc1611
2019-06-11 01:56:42 +00:00
drh
e53be9f236 Remove a comment made obsolete by check-in [71643deb6bbad4b4]. No changes
to code.

FossilOrigin-Name: 211c8002d5ea4b224125d4ed395fe15767d1dc32a77b40b89fdfc80bdd1c5a48
2019-06-11 01:30:39 +00:00
drh
378a7d356b A string consisting of a single '.' is not a floating point literal with extra
text at the end.  Fix for ticket [412bba9b22c677da]

FossilOrigin-Name: 57050162294efec90caa5cc3c2f8c1a85215526adcf57b284ce2d2e799286b78
2019-06-10 23:45:10 +00:00
dan
e4a9e4d0e5 Have ALTER TABLE commands ignore the lhs of "expr IN ()" and "expr NOT IN ()" expressions, just as other queries do. Fix for [533010b8ca].
FossilOrigin-Name: 71643deb6bbad4b4a511bfd43b32245b50a555b508b90f33adf0656ae53292c6
2019-06-10 19:17:37 +00:00
drh
99778c4b21 Improvements to the documentation for the xAccess method of the VFS.
Ticket [5e0423b058fa5adf]

FossilOrigin-Name: 7078d77effc296c63c91ec032c866e2b320f081d58e57e9e83cc58373169bda3
2019-06-10 19:07:15 +00:00
drh
c285ded26c Make sure a CAST to "NUMERIC" results in an integer if the value can be
losslessly expressed as an integer, as the documentation requires.
Ticket [dd6bffbfb6e61db9].

FossilOrigin-Name: c0c90961b4fa1c1185772d04fe1915bc1a1af27ed8ddb8db1c524bf90d68ccbf
2019-06-10 18:33:16 +00:00
dan
e20a894a34 Handle renaming a column or table when the schema contains a (meaningless) index on the constant expression ('text' IN ()) or ('text' NOT IN()).
FossilOrigin-Name: 567b13093956185b5d5e971b81ba4788fd9d26c03688f643b380f0f1c1a94da0
2019-06-10 15:34:16 +00:00
dan
32d0f64e8d Do not attempt the LIKE optimization on a column with numeric affinity if the rhs of the operator begins with whitespace. Fix for ticket [fd76310a5e].
FossilOrigin-Name: 94b58ab059cba9771e75f16d1460f313104a8fb879f9f8805725d362aa58cbcd
2019-06-10 13:46:42 +00:00
drh
55700bcd72 Remove code in the round() SQL function that became unreachable due to
the optimization of check-in [e95138f5f4febde5]

FossilOrigin-Name: b141bae3f6d16c0ebb59dac9b02086a4370839e71ade34004f647b09b1083d1d
2019-06-07 22:51:13 +00:00
drh
9a2782293c When casting string values into numeric and the string has a prefix that looks
like a number but total string is not a well-formed number, then take extra
care that the result is either integer or real depending on what the prefix
looks like.  Fix for tickets [e8bedb2a184001] and [4c2d7639f076aa].

FossilOrigin-Name: 67a68af5578f08d2be2e48cf4fd12a6cf35a09c47d259deda81950f7ee1f02f7
2019-06-07 22:26:08 +00:00
dan
4eefeb5577 Also upgrade script config.sub to the latest version. This should have been part of the previous commit.
FossilOrigin-Name: efbf31b82e6e16fda88d8cea54202a8593ff52f2267a44dba828704818162e66
2019-06-07 18:56:03 +00:00
dan
9cc867d09c Upgrade the config.guess script to the latest version.
FossilOrigin-Name: be8438133f6cd87e5d51f15cfd1eed83176b3239334875eb0c3dec502cfe39d3
2019-06-07 18:53:51 +00:00
drh
d985f7260b CLI enhancements: Add the ".filectrl" command. Make the ".testctrl" command
visible to ".help".

FossilOrigin-Name: 7b3a99fce8b4a757f2b2ef2f0b02d68566f2528d9ae1e30628522717f872466c
2019-06-05 14:29:53 +00:00
dan
48646e497b Add a test case for the unix SQLITE_FCNTL_CHUNK_SIZE file-control.
FossilOrigin-Name: 3a477fd0c944440be03d23c667053b346c769c6a4f6ba1ef094b7581a08d7bd4
2019-06-05 13:14:19 +00:00
drh
f9c7c4b1f2 In the CLI, add a small delay (0.1 seconds) after launching the output
command for ".once" before deleting the temporary file.

FossilOrigin-Name: 4979f138e8c8bef7dd6b5921fb9ca9fea86bbf7ec1419934bb2d1a0d74e77183
2019-06-04 18:21:59 +00:00