Correctly propagate error
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
Research direction
Start in pkg/parser/ast/dml.go at the Restore calls around lines 3456, 3463, and 3525. Inspect how errors from ValueExpr or ParamMarkerExpr Restore implementations are handled, then verify that those errors are returned instead of producing a successful result with invalid SQL. Run the relevant parser AST tests if available.
Written by the indexing model from the issue text.
Description
The pkg/parser/ast/dml.go file has some functions where the returned error is not checked and the error is not bubbled up when calling "Restore()" method
There are 3 calls to `` where this happens:
https://github.com/pingcap/tidb/blob/master/pkg/parser/ast/dml.go#L3456
https://github.com/pingcap/tidb/blob/master/pkg/parser/ast/dml.go#L3463
https://github.com/pingcap/tidb/blob/master/pkg/parser/ast/dml.go#L3525
This was discovered when implementing custom types (Not using parser_driver or test_driver) and the Restore method implementation of either the ValueExpr or the ParamMarkerExpr was returning an error.
I this case, Restore was still returning nil and the generated string from Restore call was an invalid SQL query.
- 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