Commit 4eb245f0 authored by Igor Babaev's avatar Igor Babaev

Correction for the previous fix.

parent 8ab81843
......@@ -6988,7 +6988,7 @@ double table_cond_selectivity(JOIN *join, uint idx, JOIN_TAB *s,
/* Discount the selectivity of the access method used to join table s */
if (s->quick && s->quick->index != MAX_KEY)
{
if (!ref)
if (join->positions[idx].key == 0)
{
/* A range scan by index s->quick->index is used to access table s */
sel*= table_records/table->quick_rows[s->quick->index];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment