diff options
author | serg@serg.mysql.com <> | 2002-11-17 20:08:42 +0100 |
---|---|---|
committer | serg@serg.mysql.com <> | 2002-11-17 20:08:42 +0100 |
commit | 1173fc780dd21fcbf58b2df10acfddb020bfce7f (patch) | |
tree | b4b37f0d9e59e076dd23038a4f16960a4886fa09 /myisammrg | |
parent | 0a75fe85d1069b500c7aaa92404f366be534ba6d (diff) | |
download | mariadb-git-1173fc780dd21fcbf58b2df10acfddb020bfce7f.tar.gz |
better boundary behaviour
Diffstat (limited to 'myisammrg')
-rw-r--r-- | myisammrg/myrg_range.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/myisammrg/myrg_range.c b/myisammrg/myrg_range.c index 9d93ad75a35..7644ae40c7b 100644 --- a/myisammrg/myrg_range.c +++ b/myisammrg/myrg_range.c @@ -30,8 +30,10 @@ ha_rows myrg_records_in_range(MYRG_INFO *info, int inx, const byte *start_key, res=mi_records_in_range(table->table, inx, start_key, start_key_len, start_search_flag, end_key, end_key_len, end_search_flag); - if (res == HA_POS_ERROR || records > HA_POS_ERROR - res) - return res; + if (res == HA_POS_ERROR) + return HA_POS_ERROR; + if (records > HA_POS_ERROR - res) + return HA_POS_ERROR-1; records+=res; } return records; |