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

runtime error: invalid memory address or nil pointer dereference (Maybe not a bug) #35310

Closed
fuboat opened this issue Jun 12, 2022 · 2 comments · Fixed by #35365
Closed

runtime error: invalid memory address or nil pointer dereference (Maybe not a bug) #35310

fuboat opened this issue Jun 12, 2022 · 2 comments · Fixed by #35365
Assignees
Labels
severity/moderate sig/sql-infra SIG: SQL Infra type/bug This issue is a bug.

Comments

@fuboat
Copy link

fuboat commented Jun 12, 2022

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

SET sql_mode="";
GRANT ALL PRIVILEGES ON *.* to '???';

2. What did you expect to see? (Required)

Query OK, 0 rows affected (0.00 sec)
ERROR 1410 (42000): You are not allowed to create a user with GRANT

3. What did you see instead (Required)

Query OK, 0 rows affected (0.00 sec)
ERROR 1105 (HY000): runtime error: invalid memory address or nil pointer dereference

4. What is your TiDB version? (Required)

Release Version: v6.2.0-alpha-97-g06737ecd2
Edition: Community
Git Commit Hash: 06737ecd29b0ae633d9ac89b0660e7a43939c88d
Git Branch: master
UTC Build Time: 2022-06-11 07:47:16
GoVersion: go1.18.2
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
Store: unistore
@fuboat fuboat added the type/bug This issue is a bug. label Jun 12, 2022
@morgo
Copy link
Contributor

morgo commented Jun 13, 2022

The relevant sql-mode is NO_AUTO_CREATE_USER. It's completely removed from MySQL 8.0, but in 5.7 can still apply. So the user '???' is expected to be created with no password (obviously not a good idea, but that's the legacy mysql behavior.)

@djshow832
Copy link
Contributor

Anyway, TiDB should never report runtime error, so it's still a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/moderate sig/sql-infra SIG: SQL Infra type/bug This issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants