Commit 4d4cbb02 authored by unknown's avatar unknown

better boundary behaviour

parent aaac92b5
...@@ -30,8 +30,10 @@ ha_rows myrg_records_in_range(MYRG_INFO *info, int inx, const byte *start_key, ...@@ -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, res=mi_records_in_range(table->table, inx,
start_key, start_key_len, start_search_flag, start_key, start_key_len, start_search_flag,
end_key, end_key_len, end_search_flag); end_key, end_key_len, end_search_flag);
if (res == HA_POS_ERROR || records > HA_POS_ERROR - res) if (res == HA_POS_ERROR)
return res; return HA_POS_ERROR;
if (records > HA_POS_ERROR - res)
return HA_POS_ERROR-1;
records+=res; records+=res;
} }
return records; return records;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment