Commit c9265171 authored by igor@rurik.mysql.com's avatar igor@rurik.mysql.com

Merge rurik.mysql.com:/home/igor/mysql-4.1

into rurik.mysql.com:/home/igor/dev/mysql-4.1-0
parents 9df91321 cfbd2b7f
...@@ -191,9 +191,8 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds) ...@@ -191,9 +191,8 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds)
range_fl & NEAR_MIN ? range_fl & NEAR_MIN ?
HA_READ_AFTER_KEY : HA_READ_AFTER_KEY :
HA_READ_KEY_OR_NEXT); HA_READ_KEY_OR_NEXT);
if ((!error || error == HA_ERR_KEY_NOT_FOUND) && if (!error && reckey_in_range(0, &ref, item_field->field,
reckey_in_range(0, &ref, item_field->field, conds, range_fl, prefix_len))
conds, range_fl, prefix_len))
error= HA_ERR_KEY_NOT_FOUND; error= HA_ERR_KEY_NOT_FOUND;
if (table->key_read) if (table->key_read)
{ {
...@@ -264,9 +263,8 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds) ...@@ -264,9 +263,8 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds)
range_fl & NEAR_MAX ? range_fl & NEAR_MAX ?
HA_READ_BEFORE_KEY : HA_READ_BEFORE_KEY :
HA_READ_PREFIX_LAST_OR_PREV); HA_READ_PREFIX_LAST_OR_PREV);
if ((!error || error == HA_ERR_KEY_NOT_FOUND) && if (!error && reckey_in_range(1, &ref, item_field->field,
reckey_in_range(1, &ref, item_field->field, conds, range_fl, prefix_len))
conds, range_fl, prefix_len))
error= HA_ERR_KEY_NOT_FOUND; error= HA_ERR_KEY_NOT_FOUND;
if (table->key_read) if (table->key_read)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment