-
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
plan: use point get plan for UPDATE statement #7586
Changes from all commits
2d804ea
78f4d7b
6beafe9
5edbe57
fc708ee
8f7e217
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -137,6 +137,11 @@ func (sr *simpleRewriter) Leave(originInNode ast.Node) (retNode ast.Node, ok boo | |
if v.Sel == nil { | ||
sr.inToExpression(len(v.List), v.Not, &v.Type) | ||
} | ||
case *ast.ParamMarkerExpr: | ||
tp := types.NewFieldType(mysql.TypeUnspecified) | ||
types.DefaultParamTypeForValue(v.GetValue(), tp) | ||
value := &Constant{Value: v.Datum, RetType: tp} | ||
sr.push(value) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am confused about this newly added modification. Since we convert ParamMakerExpr to Constant here, what if we There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We rebuild the plan for every execution. |
||
case *ast.RowExpr: | ||
sr.rowToScalarFunc(v) | ||
case *ast.ParenthesesExpr: | ||
|
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.
What is this for?
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.
Wait for the goroutine to quit to pass leak test.