Commit 32392c05 authored by Sergey Petrunya's avatar Sergey Petrunya

MDEV-6185: Buildbot valgrind failure: Conditional jump or move in table_cond_selectivity

parent 54265c5f
......@@ -7342,8 +7342,11 @@ double table_cond_selectivity(JOIN *join, uint idx, JOIN_TAB *s,
*/
for (; quick_key_map & 1 ; quick_key_map>>= 1)
{
while (keyuse->keypart == keyparts)
while (keyuse->table == table && keyuse->key == key &&
keyuse->keypart == keyparts)
{
keyuse++;
}
keyparts++;
}
sel /= table->quick_rows[key] / table->stat_records();
......
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