dolt
dolt copied to clipboard
Rows that are too large will panic
Dolt allows the creation of the following table, and trying to insert the example row results in a panic. repro.sql
panic: runtime error: slice bounds out of range [21844:19792]
goroutine 114 [running]:
github.com/dolthub/dolt/go/store/prolly/message.ItemAccess.GetItem({0x10, 0xa, 0x8, 0x4, 0x0}, 0x100000004?, {0xc00115a064?, 0xc00115a064?, 0x1001c?})
C:/Users/username/go/pkg/mod/github.com/dolthub/dolt/go/store/prolly/message/item_access.go:49 +0x16a
github.com/dolthub/dolt/go/store/prolly/tree.Node.GetKey(...)
C:/Users/username/go/pkg/mod/github.com/dolthub/dolt/go/store/prolly/tree/node.go:158
github.com/dolthub/dolt/go/store/prolly/tree.getLastKey(...)
C:/Users/username/go/pkg/mod/github.com/dolthub/dolt/go/store/prolly/tree/node.go:207
github.com/dolthub/dolt/go/store/prolly/tree.writeNewNode[...]({0x32c9590?, 0xc0000c2460}, {0x32d0320, 0xc000a96dc0}, 0x8)
C:/Users/username/go/pkg/mod/github.com/dolthub/dolt/go/store/prolly/tree/node_builder.go:46 +0x296
github.com/dolthub/dolt/go/store/prolly/tree.(*chunker[...]).handleChunkBoundary(0x33714e0, {0x32c9590, 0xc0000c2460})
C:/Users/username/go/pkg/mod/github.com/dolthub/dolt/go/store/prolly/tree/chunker.go:333 +0xb1
github.com/dolthub/dolt/go/store/prolly/tree.(*chunker[...]).append(0x33714e0, {0x32c9590, 0xc0000c2460}, {0xc00112b960, 0xa, 0xa}, {0xc00114a000, 0xffad, 0xffad}, 0x1)
C:/Users/username/go/pkg/mod/github.com/dolthub/dolt/go/store/prolly/tree/chunker.go:310 +0x1db
github.com/dolthub/dolt/go/store/prolly/tree.(*chunker[...]).AddPair(...)
C:/Users/username/go/pkg/mod/github.com/dolthub/dolt/go/store/prolly/tree/chunker.go:129
github.com/dolthub/dolt/go/store/prolly/tree.ApplyMutations[...]({0x32c9590, 0xc0000c2460}, {0x32d0320, 0xc000a96dc0}, {{0x4c, 0x0, 0x44, 0x2, 0x0}, {0x40, ...}, ...}, ...)
C:/Users/username/go/pkg/mod/github.com/dolthub/dolt/go/store/prolly/tree/mutator.go:120 +0x84c
github.com/dolthub/dolt/go/store/prolly.(*MutableMap).flushWithSerializer(_, {_, _}, {_, _})
C:/Users/username/go/pkg/mod/github.com/dolthub/dolt/go/store/prolly/tuple_mutable_map.go:84 +0x2cf
github.com/dolthub/dolt/go/store/prolly.(*MutableMap).Map(_, {_, _})
C:/Users/username/go/pkg/mod/github.com/dolthub/dolt/go/store/prolly/tuple_mutable_map.go:77 +0x1b0
github.com/dolthub/dolt/go/libraries/doltcore/sqle/writer.prollyIndexWriter.Map(...)
C:/Users/username/go/pkg/mod/github.com/dolthub/dolt/go/libraries/doltcore/sqle/writer/prolly_index_writer.go:107
github.com/dolthub/dolt/go/libraries/doltcore/sqle/writer.(*prollyTableWriter).table(0xc000a97a40, {0x32c9590, 0xc0000c2460})
C:/Users/username/go/pkg/mod/github.com/dolthub/dolt/go/libraries/doltcore/sqle/writer/prolly_table_writer.go:332 +0x65
github.com/dolthub/dolt/go/libraries/doltcore/sqle/writer.(*prollyWriteSession).flush.func1()
C:/Users/username/go/pkg/mod/github.com/dolthub/dolt/go/libraries/doltcore/sqle/writer/prolly_write_session.go:151 +0xb4
golang.org/x/sync/errgroup.(*Group).Go.func1()
C:/Users/username/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x56
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 1
C:/Users/username/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:72 +0x96
MySQL disallows the creation of the table in the first place, and displays the following error:
Error Code: 1118. Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs