mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-12 18:59:03 -06:00
fixed edge case for get many slices
This commit is contained in:
@@ -202,7 +202,7 @@ func sliceManyFields(tuple Tuple, indexes []int, slices [][]byte) [][]byte {
|
||||
}
|
||||
|
||||
// we don't have a "start" offset for the first field
|
||||
if indexes[0] == 0 {
|
||||
if len(indexes) > 0 && indexes[0] == 0 {
|
||||
o := readUint16(offs[:2])
|
||||
slices[0] = data[:o]
|
||||
indexes = indexes[1:]
|
||||
|
||||
@@ -49,7 +49,7 @@ func roundTripBytes(t *testing.T) {
|
||||
}
|
||||
|
||||
func testTupleGetMany(t *testing.T) {
|
||||
for n := 0; n < 100; n++ {
|
||||
for n := 0; n < 1000; n++ {
|
||||
fields := randomByteFields(t)
|
||||
tup := NewTuple(testPool, fields...)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user