diff options
Diffstat (limited to 'storage/heap/hp_rkey.c')
-rw-r--r-- | storage/heap/hp_rkey.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/storage/heap/hp_rkey.c b/storage/heap/hp_rkey.c index 27d1114770e..166ed28aed0 100644 --- a/storage/heap/hp_rkey.c +++ b/storage/heap/hp_rkey.c @@ -30,6 +30,7 @@ int heap_rkey(HP_INFO *info, uchar *record, int inx, const uchar *key, } info->lastinx= inx; info->current_record= (ulong) ~0L; /* For heap_rrnd() */ + info->key_version= info->s->key_version; if (keyinfo->algorithm == HA_KEY_ALG_BTREE) { @@ -50,7 +51,7 @@ int heap_rkey(HP_INFO *info, uchar *record, int inx, const uchar *key, if (!(pos= tree_search_key(&keyinfo->rb_tree, info->lastkey, info->parents, &info->last_pos, find_flag, &custom_arg))) { - info->update= 0; + info->update= HA_STATE_NO_KEY; DBUG_RETURN(my_errno= HA_ERR_KEY_NOT_FOUND); } memcpy(&pos, pos + (*keyinfo->get_key_length)(keyinfo, pos), sizeof(uchar*)); @@ -60,7 +61,7 @@ int heap_rkey(HP_INFO *info, uchar *record, int inx, const uchar *key, { if (!(pos= hp_search(info, share->keydef + inx, key, 0))) { - info->update= 0; + info->update= HA_STATE_NO_KEY; DBUG_RETURN(my_errno); } if (!(keyinfo->flag & HA_NOSAME)) |