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

Incomplete error for ALTER INSTANCE RELOAD TLS #50699

Closed
dveeden opened this issue Jan 24, 2024 · 0 comments · Fixed by #50700
Closed

Incomplete error for ALTER INSTANCE RELOAD TLS #50699

dveeden opened this issue Jan 24, 2024 · 0 comments · Fixed by #50700
Labels
severity/minor sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@dveeden
Copy link
Contributor

dveeden commented Jan 24, 2024

mysql> ALTER INSTANCE RELOAD TLS;
ERROR 1227 (42000): SUPER

This is not a correct error message.

I think this might fix it:

diff --git a/pkg/planner/core/planbuilder.go b/pkg/planner/core/planbuilder.go
index 4192c0c0c1..80da51bc92 100644
--- a/pkg/planner/core/planbuilder.go
+++ b/pkg/planner/core/planbuilder.go
@@ -3310,7 +3310,7 @@ func (b *PlanBuilder) buildSimple(ctx context.Context, node ast.StmtNode) (Plan,
                err := ErrSpecificAccessDenied.GenWithStackByArgs("RELOAD")
                b.visitInfo = appendVisitInfo(b.visitInfo, mysql.ReloadPriv, "", "", "", err)
        case *ast.AlterInstanceStmt:
-               err := ErrSpecificAccessDenied.GenWithStack("SUPER")
+               err := ErrSpecificAccessDenied.GenWithStackByArgs("SUPER")
                b.visitInfo = appendVisitInfo(b.visitInfo, mysql.SuperPriv, "", "", "", err)
        case *ast.RenameUserStmt:
                err := ErrSpecificAccessDenied.GenWithStackByArgs("CREATE USER")

Originally posted by @dveeden in #50680 (comment)

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

Successfully merging a pull request may close this issue.

1 participant