Description
The optimizer has been found to create logically incorrect query plans in some cases, which can cause incorrect query results. The bug can present if all of the following conditions are true:- The query contains a semi-join with an equality filter, such as queries in the form:
SELECT * FROM t1 WHERE EXISTS (SELECT * FROM t2 WHERE t1.a = t2.a). - The inner table has an index containing the column in the equality filter, like
t2.ain the example query above. - The index contains one or more columns that prefix the equality column.
- The prefix columns are constrained to a set of constant values via the query filter or a
CHECKconstraint, for example via anINoperator. In the case of aCHECKconstraint, the columns must beNOT NULL.

