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

Nil pointer dereference for create user 'foo'@'%' identified by '' #4085

Closed
fulghum opened this issue Aug 15, 2022 · 0 comments
Closed

Nil pointer dereference for create user 'foo'@'%' identified by '' #4085

fulghum opened this issue Aug 15, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@fulghum
Copy link
Contributor

fulghum commented Aug 15, 2022

When specifying an empty string for a user password, Dolt panics with a nil pointer dereference:

2022-08-15T12:20:32-07:00 ERROR [conn %!d(<nil>)] mysql_server caught panic:
runtime error: invalid memory address or nil pointer dereference
runtime/panic.go:260 (0x102779e57)
runtime/signal_unix.go:835 (0x102792c97)
github.com/dolthub/go-mysql-server@v0.12.1-0.20220811192639-c0b3f448ca13/sql/plan/create_user.go:74 (0x103564d40)
github.com/dolthub/go-mysql-server@v0.12.1-0.20220811192639-c0b3f448ca13/sql/analyzer/resolve_variables.go:35 (0x10377834b)
github.com/dolthub/go-mysql-server@v0.12.1-0.20220811192639-c0b3f448ca13/sql/transform/node.go:304 (0x1034a02c3)
github.com/dolthub/go-mysql-server@v0.12.1-0.20220811192639-c0b3f448ca13/sql/analyzer/resolve_variables.go:34 (0x103778267)
github.com/dolthub/go-mysql-server@v0.12.1-0.20220811192639-c0b3f448ca13/sql/analyzer/batch.go:119 (0x10372d417)
github.com/dolthub/go-mysql-server@v0.12.1-0.20220811192639-c0b3f448ca13/sql/analyzer/batch.go:65 (0x10372cee7)
github.com/dolthub/go-mysql-server@v0.12.1-0.20220811192639-c0b3f448ca13/sql/analyzer/batch.go:56 (0x103721eff)
github.com/dolthub/go-mysql-server@v0.12.1-0.20220811192639-c0b3f448ca13/sql/analyzer/analyzer.go:524 (0x103721cd0)
github.com/dolthub/go-mysql-server@v0.12.1-0.20220811192639-c0b3f448ca13/sql/analyzer/analyzer.go:379 (0x103796777)
github.com/dolthub/go-mysql-server@v0.12.1-0.20220811192639-c0b3f448ca13/engine.go:329 (0x103796720)
github.com/dolthub/go-mysql-server@v0.12.1-0.20220811192639-c0b3f448ca13/engine.go:191 (0x103795b73)
github.com/dolthub/go-mysql-server@v0.12.1-0.20220811192639-c0b3f448ca13/server/handler.go:343 (0x1038103f3)
github.com/dolthub/go-mysql-server@v0.12.1-0.20220811192639-c0b3f448ca13/server/handler.go:607 (0x103812627)
github.com/dolthub/go-mysql-server@v0.12.1-0.20220811192639-c0b3f448ca13/server/handler.go:161 (0x10380e95b)
github.com/dolthub/vitess@v0.0.0-20220811180048-dec9dd483049/go/mysql/conn.go:1286 (0x102ece19f)
github.com/dolthub/vitess@v0.0.0-20220811180048-dec9dd483049/go/mysql/conn.go:930 (0x102ecb7df)
github.com/dolthub/vitess@v0.0.0-20220811180048-dec9dd483049/go/mysql/server.go:481 (0x102ee1b63)
runtime/asm_arm64.s:1165 (0x1027af993)

MySQL handles this gracefully and creates the user.

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

No branches or pull requests

2 participants