Commit Graph

11 Commits

Author SHA1 Message Date
drh
6f2180d21a New test cases in test/in4.test require rtree, so disable those tests on
builds that lack the rtree extension.

FossilOrigin-Name: b5900914f7f34caf1a97c87233781d55467329b0ac4366354df13c6fd72a99c7
2020-01-04 17:42:27 +00:00
dan
74ebaadcdd Fix a problem where the loop for the RHS of a LEFT JOIN uses values from an IN() clause as the second or subsequent field of an index.
FossilOrigin-Name: 95ef68966c50f311830cba8c9257a4085c93011d205e0e31867c2917fa62a48e
2020-01-04 16:55:57 +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
bb53ecb1db Enhancements to the code generator for the IN operator that result in much
faster queries in some cases, for example when the RHS of the IN operator
changes for each row of a large table scan.

FossilOrigin-Name: 436e884215e2b33ca3fbb555362237b12827c07a
2014-08-02 21:03:33 +00:00
drh
fbb24d1092 The "x IN (?)" optimization in check-ins [2ff3b25f40] and [e68b427afb] is
incorrect, as demonstrated by the in4-5.1 test case in this check-in.
The "COLLATE binary" that was being added to the RHS of IN was overriding
the implicit collating sequence of the LHS.  This change defines the EP_Generic
expression node property that blocks all affinity or collating sequence
information in the expression subtree and adds that property to the expression
taken from RHS of the IN operator.

FossilOrigin-Name: 2ea4a9f75f46eaa928ba17e9e91bc0432750d46d
2014-03-20 17:03:30 +00:00
drh
0a8d14261c Previous check-in is not quite correct. "x IN (?)" is not exactly the same
as "x==?" do to collation and affinity issues.  The correct converstion should
be to "x==(+? COLLATE binary)".  The current check-in fixes this problem and
provides test cases.  Ticket [e39d032577df69]

FossilOrigin-Name: 2ff3b25f40fd117c8a2da1d1a3625f6b167b7b16
2014-03-20 14:56:47 +00:00
drh
2b59b3a4c8 Convert expressions of the form "X IN (?)" with exactly one value on the
RHS of the IN into equality tests:  "X=?".  Add test cases to verify that
statements work correctly on this corner case.
Fix for ticket [e39d032577df6942].

FossilOrigin-Name: e68b427afbc82e201c64474117851aa4c9eb0c92
2014-03-20 13:26:47 +00:00
drh
dda70fe38e Remove leftover "breakpoint" commands from test scripts. Also remove blank
lines at the end of scripts. (CVS 6721)

FossilOrigin-Name: 1fef16ec2b89981770cf44f606a420fbe031a7a4
2009-06-05 17:09:11 +00:00
danielk1977
25f42fe7a1 Remove incorrect ALWAYS macro associated with empty IN() sets. Ticket #3602. (CVS 6202)
FossilOrigin-Name: f3c09a0cb8bfc1a112c31b556d8921d5c75c5eef
2009-01-24 09:56:15 +00:00
shane
481e9f2089 Added test case to in4.test to try and duplicate crash reported on the mailing list. (CVS 5951)
FossilOrigin-Name: 8502fba37bb13c019252d0a65973a78982ec44aa
2008-11-24 15:32:00 +00:00
danielk1977
41a05b7bee Optimize queries that contain "WHERE rowid IN (x, y, z...)" by using an intkey btree to store the (x, y, z...) set instead of an index btree. (CVS 5760)
FossilOrigin-Name: 803a1736d56b3c07b8ad38715fe0e39196ecc507
2008-10-02 13:50:55 +00:00