mirror of
https://github.com/MariaDB/server.git
synced 2025-05-02 19:25:03 +03:00
Merge
This commit is contained in:
commit
e59e529635
@ -3341,10 +3341,7 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item *cond)
|
|||||||
param.is_ror_scan= FALSE;
|
param.is_ror_scan= FALSE;
|
||||||
|
|
||||||
if (create_key_parts_for_pseudo_indexes(¶m, used_fields))
|
if (create_key_parts_for_pseudo_indexes(¶m, used_fields))
|
||||||
{
|
|
||||||
free_root(&alloc, MYF(0));
|
|
||||||
goto free_alloc;
|
goto free_alloc;
|
||||||
}
|
|
||||||
|
|
||||||
param.prev_tables= param.read_tables= 0;
|
param.prev_tables= param.read_tables= 0;
|
||||||
param.current_table= table->map;
|
param.current_table= table->map;
|
||||||
|
@ -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 */
|
/* Discount the selectivity of the access method used to join table s */
|
||||||
if (s->quick && s->quick->index != MAX_KEY)
|
if (s->quick && s->quick->index != MAX_KEY)
|
||||||
{
|
{
|
||||||
if (join->positions[idx].key == 0)
|
if (join->positions[idx].key == 0)
|
||||||
{
|
{
|
||||||
sel*= table->quick_rows[s->quick->index]/table_records;
|
sel*= table->quick_rows[s->quick->index]/table_records;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user