diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2014-03-21 00:53:41 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2014-03-21 00:53:41 +0400 |
commit | 0e211841f2ecdff55dab4456c0ccc0cc846f3b35 (patch) | |
tree | 8bde305e2b22ae3b981664a9d2e4b6dd7fe6f926 /sql/sql_statistics.cc | |
parent | e4fde57712afd106ccf9752ceadcdcac604da8d9 (diff) | |
download | mariadb-git-0e211841f2ecdff55dab4456c0ccc0cc846f3b35.tar.gz |
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)
Diffstat (limited to 'sql/sql_statistics.cc')
-rw-r--r-- | sql/sql_statistics.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc index bbe35ea75f0..fd521f7a2ec 100644 --- a/sql/sql_statistics.cc +++ b/sql/sql_statistics.cc @@ -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 * |