-
Notifications
You must be signed in to change notification settings - Fork 6k
Open
Labels
contributionThis PR is from a community contributor.This PR is from a community contributor.first-time-contributorIndicates that the PR was contributed by an external member and is a first-time contributor.Indicates that the PR was contributed by an external member and is a first-time contributor.type/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
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.
Metadata
Metadata
Assignees
Labels
contributionThis PR is from a community contributor.This PR is from a community contributor.first-time-contributorIndicates that the PR was contributed by an external member and is a first-time contributor.Indicates that the PR was contributed by an external member and is a first-time contributor.type/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.