Update vendor/

This commit is contained in:
2018-06-25 23:27:32 +01:00
parent 4f5e3ed906
commit d25ed6c1bd
182 changed files with 31368 additions and 6047 deletions

View File

@@ -42,7 +42,16 @@ type RangeCursor struct {
// First element
func (c *RangeCursor) First() ([]byte, []byte) {
if c.Reverse {
return c.C.Seek(c.Max)
k, v := c.C.Seek(c.Max)
// If Seek doesn't find a key it goes to the next.
// If so, we need to get the previous one to avoid
// including bigger values. #218
if !bytes.HasPrefix(k, c.Max) && k != nil {
k, v = c.C.Prev()
}
return k, v
}
return c.C.Seek(c.Min)