1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-20424: New default value for optimizer_use_condition-selectivity leads to bad plan

In the function prev_record_reads where one finds the different row combinations for a
subset of partial join, it did not take into account the selectivity of tables
involved in the subset of partial join.
This commit is contained in:
Varun Gupta
2019-10-27 01:48:00 +05:30
parent 6f86150ab3
commit 8afe4bba2e
4 changed files with 146 additions and 0 deletions

View File

@ -8470,7 +8470,10 @@ prev_record_reads(POSITION *positions, uint idx, table_map found_ref)
#max_nested_outer_joins=64-1) will not make it any more precise.
*/
if (pos->records_read)
{
found= COST_MULT(found, pos->records_read);
found*= pos->cond_selectivity;
}
}
}
return found;