summaryrefslogtreecommitdiff
path: root/heap/hp_rkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'heap/hp_rkey.c')
-rw-r--r--heap/hp_rkey.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/heap/hp_rkey.c b/heap/hp_rkey.c
index 4e47fd52e9b..92d2982a457 100644
--- a/heap/hp_rkey.c
+++ b/heap/hp_rkey.c
@@ -36,10 +36,9 @@ int heap_rkey(HP_INFO *info, byte *record, int inx, const byte *key,
{
heap_rb_param custom_arg;
- hp_rb_pack_key(keyinfo, info->recbuf, key);
-
custom_arg.keyseg= info->s->keydef[inx].seg;
- custom_arg.key_length= key_len;
+ custom_arg.key_length= info->lastkey_len=
+ hp_rb_pack_key(keyinfo, info->recbuf, key, key_len);
custom_arg.search_flag= SEARCH_FIND | SEARCH_SAME;
/* for next rkey() after deletion */
if (find_flag == HA_READ_AFTER_KEY)
@@ -48,7 +47,6 @@ int heap_rkey(HP_INFO *info, byte *record, int inx, const byte *key,
info->last_find_flag= HA_READ_KEY_OR_PREV;
else
info->last_find_flag= find_flag;
- info->lastkey_len= key_len;
if (!(pos= tree_search_key(&keyinfo->rb_tree, info->recbuf, info->parents,
&info->last_pos, find_flag, &custom_arg)))
{