-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
expression: Fix the wrong behavior of const.String() #17495
Conversation
|
||
tk.MustExec("use test;") | ||
tk.MustExec("drop table if exists t;") | ||
tk.MustExec("set @@tidb_enable_vectorized_expression = false;") |
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.
Set this to test the behavior of const.Eval()
. If we don't change the implementation of the const.Eval()
. The following SQL statement will panic.
@SunRunAway PTAL |
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
Codecov Report
@@ Coverage Diff @@
## master #17495 +/- ##
===========================================
Coverage 79.4585% 79.4585%
===========================================
Files 524 524
Lines 141212 141212
===========================================
Hits 112205 112205
Misses 19948 19948
Partials 9059 9059 |
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
/run-all-tests |
@Reminiscent merge failed. |
/merge |
/run-all-tests |
@Reminiscent merge failed. |
/merge |
/run-all-tests |
@Reminiscent merge failed. |
/merge |
1 similar comment
/merge |
/run-all-tests |
/run-all-tests |
@Reminiscent merge failed. |
/run-integration-br-test |
Please fix the release note as user perspective. |
Signed-off-by: sre-bot <[email protected]>
cherry pick to release-4.0 in PR #17673 |
What problem does this PR solve?
Issue Number: close #17287
Problem Summary:
const.String()
is wrong.const.DeferredExpr != nil
, we need to use the passed function parameterchunk.row
forEval
, instead of using an emptychunk.Row
.What is changed and how it works?
Use the
const.DeferredExpr.String()
rather than to eval theconst
.Use the function parameter
chunk.row
forEval
instead of an emptychunk.Row()
.Related changes
Check List
Tests
Release note
prepare
statement