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

MDEV-5917: EITS: different order of predicates in IN (...) causes different estimates

- Save range key before making field->pos_in_interval() call (like we do for non-equality ranges)
This commit is contained in:
Sergey Petrunya
2014-03-21 00:53:41 +04:00
parent e4fde57712
commit 0e211841f2
3 changed files with 65 additions and 0 deletions

View File

@ -3514,6 +3514,8 @@ double get_column_range_cardinality(Field *field,
Histogram *hist= &col_stats->histogram;
if (hist->is_available())
{
store_key_image_to_rec(field, (uchar *) min_endp->key,
min_endp->length);
double pos= field->pos_in_interval(col_stats->min_value,
col_stats->max_value);
res= col_non_nulls *