summaryrefslogtreecommitdiff
path: root/myisam/mi_rkey.c
diff options
context:
space:
mode:
authorunknown <serg@serg.mysql.com>2002-11-25 22:18:44 +0100
committerunknown <serg@serg.mysql.com>2002-11-25 22:18:44 +0100
commitae74573e3aa85b9b9a57da6e2ad9dae578b709f4 (patch)
tree02a55f44bad9f485e0d76216a95e10c2aafa692c /myisam/mi_rkey.c
parent663b8e3c07200562ef9cefd81a93af80dc26e888 (diff)
downloadmariadb-git-ae74573e3aa85b9b9a57da6e2ad9dae578b709f4.tar.gz
myisammrg::index_next_same
myisammrg/Makefile.am: myrg_rnext_same.c added
Diffstat (limited to 'myisam/mi_rkey.c')
-rw-r--r--myisam/mi_rkey.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/myisam/mi_rkey.c b/myisam/mi_rkey.c
index cefb7a74dd1..4a3c76809e8 100644
--- a/myisam/mi_rkey.c
+++ b/myisam/mi_rkey.c
@@ -38,7 +38,15 @@ int mi_rkey(MI_INFO *info, byte *buf, int inx, const byte *key, uint key_len,
info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
info->last_key_func=search_flag;
- if (!info->use_packed_key)
+ if (info->once_flags & USE_PACKED_KEYS)
+ {
+ /* key is already packed! */
+ key_buff=info->lastkey+info->s->base.max_key_length;
+ info->last_rkey_length=pack_key_length=key_len;
+ bmove(key_buff,key,key_len);
+ info->once_flags&= ~USE_PACKED_KEYS;
+ }
+ else
{
if (key_len == 0)
key_len=USE_WHOLE_KEY;
@@ -48,13 +56,6 @@ int mi_rkey(MI_INFO *info, byte *buf, int inx, const byte *key, uint key_len,
DBUG_EXECUTE("key",_mi_print_key(DBUG_FILE,share->keyinfo[inx].seg,
key_buff,pack_key_length););
}
- else
- {
- /* key is already packed! */
- key_buff=info->lastkey+info->s->base.max_key_length;
- info->last_rkey_length=pack_key_length=key_len;
- bmove(key_buff,key,key_len);
- }
if (fast_mi_readinfo(info))
goto err;