planner: GRANT PROXY reports an internal Go type instead of an unsupported-feature error
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start with PlanBuilder.Build in pkg/planner/core/planbuilder.go and the GRANT PROXY parser rule in pkg/parser/parser.y. Run the SQL reproduction from the issue, then verify that GRANT PROXY reports a clear unsupported-feature error instead of exposing an internal Go type. Done means the diagnostic is corrected without implementing proxy-user support.
Written by the indexing model from the issue text.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
Run the following SQL as an administrative user:
CREATE USER 'proxy_base'@'%' IDENTIFIED BY 'Test12345!';
CREATE USER 'proxy_target'@'%' IDENTIFIED BY 'Test12345!';
GRANT PROXY ON 'proxy_base'@'%' TO 'proxy_target'@'%';
This report concerns the error message for an unsupported statement, not a request to implement proxy-user support.
2. What did you expect to see? (Required)
A clear error explaining that TiDB does not support GRANT PROXY, for example:
This version of TiDB doesn't yet support 'GRANT PROXY'
3. What did you see instead (Required)
The reported execution returned:
ERROR 8108 (HY000): Unsupported type *resolve.NodeW
This exposes an internal Go type without explaining which SQL feature is unsupported.
Source inspection also confirms the same diagnostic problem on master at ebcba3eefb082713e6cf7f7c04511335c563d7e1: the parser accepts GRANT PROXY, but PlanBuilder.Build has no branch for *ast.GrantProxyStmt and falls through to ErrUnsupportedType. That revision formats node.Node, so its expected message is Unsupported type *ast.GrantProxyStmt, rather than the wrapper type in the reported output. This master result is inferred from source, not a local runtime reproduction.
Severity assessment: minor. The confirmed defect is an unclear diagnostic for an unsupported feature. No data corruption, incorrect query results, privilege bypass, or failure of a supported operation has been demonstrated.
4. What is your TiDB version? (Required)
The exact TiDB version for the reported SQL output was not provided.
Master was inspected at ebcba3eefb082713e6cf7f7c04511335c563d7e1. No local TiDB server reproduction was performed.
- Dominant language
- Go
- Stars
- 40.6k
- Forks
- 6.2k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 168
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pingcap/tidb
-
affects-9.0 found-by-ai may-affects-25.10 may-affects-26.3 may-affects-26.9 may-affects-7.5 may-affects-8.1 may-affects-8.5 severity/major sig/execution type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
affects-8.1 affects-8.5 component/statistics severity/moderate type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
affects-26.3 affects-9.0 component/ddl found-by-ai severity/major type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
contribution may-affects-25.10 may-affects-26.3 may-affects-26.9 may-affects-7.5 may-affects-8.1 may-affects-8.5 severity/major sig/execution type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
component/test severity/minor type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100