-
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
*: fix reuse chunk test #38996
*: fix reuse chunk test #38996
Conversation
[REVIEW NOTIFICATION] This pull request has not been approved. To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
if tk.alloc != nil { | ||
tk.alloc.Reset() | ||
} | ||
}() | ||
tk.MustExecWithContext(context.Background(), sql, args...) | ||
} | ||
|
||
// MustExecWithContext executes a sql statement and asserts nil error. | ||
func (tk *TestKit) MustExecWithContext(ctx context.Context, sql string, args ...interface{}) { |
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.
Considering all functions will eventually invoke MustExecWithContext
, why adding hooks to every exec and query function?
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.
Cannot get all the error information in the MustExecWithContext function,such as GetRows4Test.I need to get the final result for exception handling, so I can't handle it in MustExecWithContext
/run-check_dev_2 |
What problem does this PR solve?
Issue Number:ref #38914
Problem Summary:
What is changed and how it works?
Chunk reuse is used when the test case directly use (tk *TestKit) Exec ,cause (s *SessionVars) ClearAlloc() to fail to cover all cases.
Now using (tk *TestKit) Exec directly will not work by default chunk reuse
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.