diff options
author | unknown <timour@mysql.com> | 2005-02-23 14:47:48 +0200 |
---|---|---|
committer | unknown <timour@mysql.com> | 2005-02-23 14:47:48 +0200 |
commit | 9c7879c281e9c9ae93fecc0f801fc6199ed48c1a (patch) | |
tree | 5db575582a183734ae4a4b04f0cf347d3f00932b | |
parent | 72cc9fbd5bba767bef7e9461b3eb1c236a20ce3d (diff) | |
parent | 51408489b192a15cfe1317d49439d066d22d7cc5 (diff) | |
download | mariadb-git-9c7879c281e9c9ae93fecc0f801fc6199ed48c1a.tar.gz |
Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into mysql.com:/home/timka/mysql/src/5.0-bug-8576
sql/opt_range.cc:
Auto merged
-rw-r--r-- | sql/opt_range.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 66d9da10334..0418225965a 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -7030,8 +7030,12 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree) cur_group_key_parts, tree, cur_index_tree, cur_quick_prefix_records, have_min, have_max, &cur_read_cost, &cur_records); - - if (cur_read_cost < best_read_cost) + /* + If cur_read_cost is lower than best_read_cost use cur_index. + Do not compare doubles directly because they may have different + representations (64 vs. 80 bits). + */ + if (cur_read_cost < best_read_cost - (DBL_EPSILON * cur_read_cost)) { index_info= cur_index_info; index= cur_index; |