-
Notifications
You must be signed in to change notification settings - Fork 3.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
sql: Avoid evaluating VALUES expressions during prepare. #6242
Conversation
This patch gets a failure on TestLogic for explain_debug:
Seems EXPLAIN(DEBUG) is now seeing the value rows two times. How come? cc @RaduBerinde |
Review status: 0 of 3 files reviewed at latest revision, 6 unresolved discussions, some commit checks pending. sql/values.go, line 33 [r1] (raw file): sql/values.go, line 50 [r1] (raw file): sql/values.go, line 51 [r1] (raw file): sql/values.go, line 77 [r1] (raw file): sql/values.go, line 83 [r1] (raw file): sql/values.go, line 94 [r1] (raw file): Comments from Reviewable |
^Looks like that statement is Review status: 0 of 3 files reviewed at latest revision, 7 unresolved discussions, some commit checks failed. sql/values_test.go, line 115 [r1] (raw file): Comments from Reviewable |
Thanks for fixing this @knz. Review status: 0 of 3 files reviewed at latest revision, 9 unresolved discussions, some commit checks failed. sql/values.go, line 77 [r1] (raw file): sql/values.go, line 78 [r1] (raw file): sql/values.go, line 93 [r1] (raw file): Comments from Reviewable |
Review status: 0 of 3 files reviewed at latest revision, 9 unresolved discussions, some commit checks failed. sql/values.go, line 93 [r1] (raw file): Comments from Reviewable |
Review status: 0 of 8 files reviewed at latest revision, 9 unresolved discussions, some commit checks pending. sql/values.go, line 33 [r1] (raw file): sql/values.go, line 50 [r1] (raw file): sql/values.go, line 51 [r1] (raw file): sql/values.go, line 77 [r1] (raw file): sql/values.go, line 78 [r1] (raw file): sql/values.go, line 83 [r1] (raw file): sql/values.go, line 93 [r1] (raw file): sql/values.go, line 94 [r1] (raw file): sql/values_test.go, line 115 [r1] (raw file): Comments from Reviewable |
Review status: 0 of 8 files reviewed at latest revision, 10 unresolved discussions, all commit checks successful. sql/explain.go, line 218 [r2] (raw file): Comments from Reviewable |
Review status: 0 of 8 files reviewed at latest revision, 10 unresolved discussions, all commit checks successful. sql/explain.go, line 218 [r2] (raw file): Comments from Reviewable |
Review status: 0 of 8 files reviewed at latest revision, 10 unresolved discussions, all commit checks successful. sql/explain.go, line 218 [r2] (raw file): Comments from Reviewable |
Review status: 0 of 8 files reviewed at latest revision, 10 unresolved discussions, all commit checks successful. sql/explain.go, line 218 [r2] (raw file): Comments from Reviewable |
Reviewed 1 of 3 files at r1, 7 of 7 files at r2, 1 of 1 files at r3. sql/plan.go, line 461 [r3] (raw file): sql/values.go, line 83 [r1] (raw file): Comments from Reviewable |
Spotted by @nvanbenschoten: prior to this patch VALUES would evaluate its expressions during prepare, and thus fail (with either a crash or an obscure error) if the expression contains a placeholder as argument to a function.
Review status: 6 of 9 files reviewed at latest revision, 9 unresolved discussions, some commit checks pending. sql/plan.go, line 461 [r3] (raw file): sql/values.go, line 83 [r1] (raw file): Comments from Reviewable |
Reviewed 3 of 3 files at r4. Comments from Reviewable |
LGTY? |
Review status: all files reviewed at latest revision, 8 unresolved discussions, all commit checks successful. Comments from Reviewable |
Spotted by @nvanbenschoten: prior to this patch VALUES would evaluate
its expressions during prepare, and thus fail (with either a crash or
an obscure error) if the expression contains a placeholder as argument
to a function.
Fixes #6225.
This change is