Sub-optimal query plan is picked from range vs another range vs ref

Description

And two query plans:

optimizer's choice between Good and Bad query plans depends on the values of const2A and const2B.

Note that both query plans use the same index, but the Good plan uses more key
parts. The point is that Good plan should always be used, because it scans a
proper subset of rows that the Bad plan is scanning.

Environment

None

Assignee

Sergei Petrunia

Reporter

Sergei Petrunia

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure