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

Merge 10.1 into 10.2

This commit is contained in:
Marko Mäkelä
2018-11-06 08:41:48 +02:00
277 changed files with 16966 additions and 4246 deletions

View File

@ -3128,6 +3128,12 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item **cond)
}
if (quick && (quick->get_type() == QUICK_SELECT_I::QS_TYPE_ROR_UNION ||
quick->get_type() == QUICK_SELECT_I::QS_TYPE_INDEX_MERGE))
{
table->cond_selectivity*= (quick->records/table_records);
}
bitmap_union(used_fields, &handled_columns);
/* Check if we can improve selectivity estimates by using sampling */