-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
executor: add placeholder count check in prepare stage #7162
executor: add placeholder count check in prepare stage #7162
Conversation
ddl/table.go
Outdated
@@ -203,7 +203,8 @@ func onTruncateTable(t *meta.Meta, job *model.Job) (ver int64, _ error) { | |||
job.State = model.JobStateCancelled | |||
return ver, errors.Trace(err) | |||
} | |||
tblInfo, err := getTableInfo(t, job, schemaID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before rebase ...go tool vet
will say this shadow err
...but after rebase complain is disappeared, orz....
reverted..
/run-all-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a test case to cover this?
executor/prepared_test.go
Outdated
@@ -21,6 +21,8 @@ import ( | |||
"github.com/pingcap/tidb/terror" | |||
"github.com/pingcap/tidb/util/testkit" | |||
"golang.org/x/net/context" | |||
"math" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move these 2 lines to line 17
PTAL @XuHuaiyu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
What have you changed? (mandatory)
Now, client will meet error when input parameter placeholder count > 65535 in exec stage
this PR add placeholder num check in prepare stage to return error more quick and more evident and make it compatible with mysql.
What is the type of the changes? (mandatory)
How has this PR been tested? (mandatory)
Does this PR affect documentation (docs/docs-cn) update? (mandatory)
no
Does this PR affect tidb-ansible update? (mandatory)
no
Does this PR need to be added to the release notes? (mandatory)
no
Refer to a related PR or issue link (optional)
Benchmark result if necessary (optional)
Add a few positive/negative examples (optional)
run
expect:
but got:
This change is