-
Notifications
You must be signed in to change notification settings - Fork 6k
session: fix initGlobalVariableIfNotExists
function forget call rs.close
#61890
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
Conversation
Hi @Defined2014. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@Defined2014: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #61890 +/- ##
================================================
+ Coverage 73.0325% 73.5039% +0.4714%
================================================
Files 1735 1735
Lines 481432 481446 +14
================================================
+ Hits 351602 353882 +2280
+ Misses 108298 106060 -2238
+ Partials 21532 21504 -28
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
/retest |
@Defined2014: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/retest |
@Defined2014: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
pkg/session/bootstrap.go
Outdated
@@ -1046,8 +1046,8 @@ func initGlobalVariableIfNotExists(s sessiontypes.Session, name string, val any) | |||
mysql.SystemDB, mysql.GlobalVariablesTable, name) | |||
terror.MustNil(err) | |||
req := rs.NewChunk(nil) | |||
err = rs.Next(ctx, req) | |||
terror.MustNil(err) | |||
terror.MustNil(rs.Next(ctx, req)) |
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.
maybe it's better to use
tidb/pkg/util/sqlexec/restricted_sql_executor.go
Lines 255 to 256 in cbafb78
// DrainRecordSetAndClose fetches the rows in the RecordSet and closes it. | |
func DrainRecordSetAndClose(ctx context.Context, rs RecordSet, maxChunkSize int) ([]chunk.Row, error) { |
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.
Upated it with sqlexec.ExecSQL
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: glorv, xhebox, yudongusa The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created to branch |
What problem does this PR solve?
Issue Number: close #61884
Problem Summary:
What changed and how does it work?
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.