Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic during dolt dumpif db contains a (non-empty) table with virtual columns #8325

Open
nicktobey opened this issue Sep 4, 2024 · 0 comments
Labels
bug Something isn't working panic

Comments

@nicktobey
Copy link
Contributor

Repro:

dolt init
dolt sql -q "create table test(pk int primary key, g int as (pk*pk));"
dolt sql -q "insert into test(pk) values (1);"
dolt dump -f -fn ~/dump.sql

Expected output: Successfully exported data.

Actual output:

panic: runtime error: index out of range [0] with length 0

goroutine 39 [running]:
github.com/dolthub/dolt/go/libraries/doltcore/schema.(*ColCollection).GetByIndex(...)
	/Users/nick/Documents/dolt/go/libraries/doltcore/schema/col_coll.go:246
github.com/dolthub/dolt/go/libraries/doltcore/sqle/sqlfmt.SqlRowAsTupleString({0x140011897c0?, 0x2, 0x14000c31e68?}, {0x1032c3940, 0x140011a0700})
	/Users/nick/Documents/dolt/go/libraries/doltcore/sqle/sqlfmt/row_fmt.go:341 +0x340
github.com/dolthub/dolt/go/libraries/doltcore/table/untyped/sqlexport.(*BatchSqlExportWriter).WriteSqlRow(0x1400091bd90, {0x1032284c8?, 0x140009d44b0?}, {0x140011897c0, 0x2, 0x2})
	/Users/nick/Documents/dolt/go/libraries/doltcore/table/untyped/sqlexport/batch_sqlwriter.go:123 +0x198
github.com/dolthub/dolt/go/libraries/doltcore/mvdata.(*DataMoverPipeline).Execute.func2()
	/Users/nick/Documents/dolt/go/libraries/doltcore/mvdata/pipeline.go:87 +0xf0
golang.org/x/sync/errgroup.(*Group).Go.func1()
	/Users/nick/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x58
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 1
	/Users/nick/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x98
@timsehn timsehn added bug Something isn't working panic labels Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working panic
Projects
None yet
Development

No branches or pull requests

2 participants