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

dolt sql-client panics if passed a branch scoped database #4623

Closed
timsehn opened this issue Oct 25, 2022 · 1 comment
Closed

dolt sql-client panics if passed a branch scoped database #4623

timsehn opened this issue Oct 25, 2022 · 1 comment
Assignees
Labels
bug Something isn't working cli good repro Easily reproducible bugs panic

Comments

@timsehn
Copy link
Sponsor Contributor

timsehn commented Oct 25, 2022

$ dolt sql-client --use-db "test_branch_control/foo" -u root -q "show tables"
invalid DSN: did you forget to escape a param value?
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x272c434]

goroutine 1 [running]:
github.com/dolthub/dolt/go/cmd/dolt/commands/sqlserver.(*ServerController).StopServer(0x30111a0?)
	/Users/timsehn/dolthub/git/dolt/go/cmd/dolt/commands/sqlserver/servercontroller.go:69 +0x14
github.com/dolthub/dolt/go/cmd/dolt/commands/sqlserver.SqlClientCmd.Exec({{0x2c38545?, 0xc000596240?}}, {0x3028518?, 0xc00057a600}, {0xc000058780, 0xf}, {0xc000134020, 0x6, 0x6}, 0xc000af2510)
	/Users/timsehn/dolthub/git/dolt/go/cmd/dolt/commands/sqlserver/sqlclient.go:208 +0x1105
github.com/dolthub/dolt/go/cmd/dolt/cli.SubCommandHandler.handleCommand({{0x2c36043, 0x4}, {0x2c526de, 0x11}, {0x0, 0x0}, {0xc0005e4000, 0x2f, 0x2f}, 0x0}, ...)
	/Users/timsehn/dolthub/git/dolt/go/cmd/dolt/cli/command.go:237 +0x502
github.com/dolthub/dolt/go/cmd/dolt/cli.SubCommandHandler.Exec({{0x2c36043, 0x4}, {0x2c526de, 0x11}, {0x0, 0x0}, {0xc0005e4000, 0x2f, 0x2f}, 0x0}, ...)
	/Users/timsehn/dolthub/git/dolt/go/cmd/dolt/cli/command.go:186 +0x47e
main.runMain()
	/Users/timsehn/dolthub/git/dolt/go/cmd/dolt/dolt.go:395 +0x7a5
main.main()
	/Users/timsehn/dolthub/git/dolt/go/cmd/dolt/dolt.go:140 +0x19
@timsehn timsehn added bug Something isn't working cli panic good repro Easily reproducible bugs labels Oct 25, 2022
@timsehn
Copy link
Sponsor Contributor Author

timsehn commented Oct 25, 2022

From the server shell:

$ dolt  branch
  foo                                           	
* main                                          	
$ dolt sql-server
Starting server with Config HP="localhost:3306"|T="28800000"|R="false"|L="info"|S="/tmp/mysql.sock"
^C%                                                                             $ pwd
/Users/timsehn/dolthub/dolt/test_branch_control

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli good repro Easily reproducible bugs panic
Projects
None yet
Development

No branches or pull requests

2 participants