diff options
Diffstat (limited to 'isam/_search.c')
-rw-r--r-- | isam/_search.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/isam/_search.c b/isam/_search.c index 445340a21d6..d5e145ae0bf 100644 --- a/isam/_search.c +++ b/isam/_search.c @@ -118,7 +118,7 @@ int _nisam_search(register N_INFO *info, register N_KEYDEF *keyinfo, uchar *key, if ((nextflag & (SEARCH_SMALLER | SEARCH_LAST)) && flag != 0) { keypos=_nisam_get_last_key(info,keyinfo,buff,lastkey,keypos); - if ((nextflag & SEARCH_LAST) && + if (!(nextflag & SEARCH_SMALLER) && _nisam_key_cmp(keyinfo->seg, info->lastkey, key, key_len, SEARCH_FIND)) { my_errno=HA_ERR_KEY_NOT_FOUND; /* Didn't find key */ |