summaryrefslogtreecommitdiff
path: root/sql/opt_sum.cc
diff options
context:
space:
mode:
authorholyfoot/hf@mysql.com/hfmain.(none) <>2007-05-18 23:21:34 +0500
committerholyfoot/hf@mysql.com/hfmain.(none) <>2007-05-18 23:21:34 +0500
commite04000ec21b57240485bb6dbb7947f994c0a005a (patch)
tree7d30c84f3e11d43af69392d6fc2b7e0b7846dc3c /sql/opt_sum.cc
parent44331376e7fbe96bb94fdde81b62355100c27c46 (diff)
downloadmariadb-git-e04000ec21b57240485bb6dbb7947f994c0a005a.tar.gz
merging
Diffstat (limited to 'sql/opt_sum.cc')
-rw-r--r--sql/opt_sum.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc
index c020b9ab53e..60df49bd318 100644
--- a/sql/opt_sum.cc
+++ b/sql/opt_sum.cc
@@ -271,7 +271,7 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds)
we have a >= predicate for the MIN argument.
*/
error= table->file->index_read(table->record[0], ref.key_buff,
- ref.key_length,
+ make_prev_keypart_map(ref.key_parts),
HA_READ_KEY_OR_NEXT);
else
{
@@ -282,7 +282,8 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds)
We need to scan the next bigger record first.
*/
error= table->file->index_read(table->record[0], ref.key_buff,
- ref.key_length, HA_READ_AFTER_KEY);
+ make_prev_keypart_map(ref.key_parts),
+ HA_READ_AFTER_KEY);
/*
If the found record is outside the group formed by the search
prefix, or there is no such record at all, check if all
@@ -305,7 +306,7 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds)
{
DBUG_ASSERT(item_field->field->real_maybe_null());
error= table->file->index_read(table->record[0], ref.key_buff,
- ref.key_length,
+ make_prev_keypart_map(ref.key_parts),
HA_READ_KEY_EXACT);
}
}