summaryrefslogtreecommitdiff
path: root/sql/opt_sum.cc
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2004-09-15 23:52:46 -0700
committerunknown <igor@rurik.mysql.com>2004-09-15 23:52:46 -0700
commit63cda4c7e4bbfc67ca93e404714fd293022ff8f1 (patch)
tree432052783e108895bc14c78cedf97a732e6dd1ca /sql/opt_sum.cc
parenteb72c28b9b8e7fe785e918cc1c366b4fce6fa8f6 (diff)
downloadmariadb-git-63cda4c7e4bbfc67ca93e404714fd293022ff8f1.tar.gz
opt_sum.cc:
Slightly improved the fix for bug #5406. sql/opt_sum.cc: Slightly improved the fix for bug #5406.
Diffstat (limited to 'sql/opt_sum.cc')
-rw-r--r--sql/opt_sum.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc
index 538f5c6097d..613b2a4aec1 100644
--- a/sql/opt_sum.cc
+++ b/sql/opt_sum.cc
@@ -191,9 +191,8 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds)
range_fl & NEAR_MIN ?
HA_READ_AFTER_KEY :
HA_READ_KEY_OR_NEXT);
- if ((!error || error == HA_ERR_KEY_NOT_FOUND) &&
- reckey_in_range(0, &ref, item_field->field,
- conds, range_fl, prefix_len))
+ if (!error && reckey_in_range(0, &ref, item_field->field,
+ conds, range_fl, prefix_len))
error= HA_ERR_KEY_NOT_FOUND;
if (table->key_read)
{
@@ -264,9 +263,8 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds)
range_fl & NEAR_MAX ?
HA_READ_BEFORE_KEY :
HA_READ_PREFIX_LAST_OR_PREV);
- if ((!error || error == HA_ERR_KEY_NOT_FOUND) &&
- reckey_in_range(1, &ref, item_field->field,
- conds, range_fl, prefix_len))
+ if (!error && reckey_in_range(1, &ref, item_field->field,
+ conds, range_fl, prefix_len))
error= HA_ERR_KEY_NOT_FOUND;
if (table->key_read)
{