You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When executing a sharded query with an EXISTS using the Gen4 planner, VTTablet produces the following error: missing bind var __sq_has_values1. The v3 planner does not fail.
The issue was first seen in #9710 when changing VTGate's default planner. The test TestExplain started failing (See failure in CI) with the selectsharded query:
select name from user where exists (select id from t1) /* non-correlated subquery as EXISTS */;
The plan for the query above is:
{
"QueryType": "SELECT",
"Original": "select name from user where exists (select id from t1)",
"Instructions": {
"OperatorType": "Subquery",
"Variant": "PulloutExists",
"PulloutVars": [
"__sq_has_values1"
],
"Inputs": [
{
"OperatorType": "Route",
"Variant": "Scatter",
"Keyspace": {
"Name": "zlookup_unique",
"Sharded": true
},
"FieldQuery": "select id from t1 where 1 != 1",
"Query": "select id from t1",
"Table": "t1"
},
{
"OperatorType": "Route",
"Variant": "Scatter",
"Keyspace": {
"Name": "user",
"Sharded": true
},
"FieldQuery": "select `name` from `user` where 1 != 1",
"Query": "select `name` from `user` where :__sq_has_values1",
"Table": "`user`"
}
]
}
}
The issue is also reproducible with the local examples.
Reproduction Steps
Deploy a sharded Vitess cluster using the examples
Run the following query:
select/*vt+ PLANNER=gen4 */ order_id from corder where exists (select customer_id from customer);
Overview of the Issue
When executing a sharded query with an
EXISTS
using theGen4
planner, VTTablet produces the following error:missing bind var __sq_has_values1
. Thev3
planner does not fail.The issue was first seen in #9710 when changing VTGate's default planner. The test
TestExplain
started failing (See failure in CI) with theselectsharded
query:The plan for the query above is:
The issue is also reproducible with the local examples.
Reproduction Steps
Binary Version
Operating System and Environment details
Log Fragments
No response
The text was updated successfully, but these errors were encountered: