For a query such as:
select id
from user
where id = 42
union
select id
from user
where id = 42
limit 3 offset 7
The planner is forgetting about the outer LIMIT/OFFSET, and sending the query down without them:
{
"Type": "Passthrough",
"QueryType": "SELECT",
"Original": "(select id from user where id = 42) union (select id from user where id = 42) limit 3 offset 7",
"Instructions": {
"OperatorType": "Route",
"Variant": "EqualUnique",
"Keyspace": {
"Name": "user",
"Sharded": true
},
"FieldQuery": "select id from `user` where 1 != 1 union select id from `user` where 1 != 1",
"Query": "select id from `user` where id = 42 union select id from `user` where id = 42",
"Values": [
"42"
],
"Vindex": "user_index"
},
"TablesUsed": [
"user.user"
]
}
For a query such as:
The planner is forgetting about the outer LIMIT/OFFSET, and sending the query down without them:
{ "Type": "Passthrough", "QueryType": "SELECT", "Original": "(select id from user where id = 42) union (select id from user where id = 42) limit 3 offset 7", "Instructions": { "OperatorType": "Route", "Variant": "EqualUnique", "Keyspace": { "Name": "user", "Sharded": true }, "FieldQuery": "select id from `user` where 1 != 1 union select id from `user` where 1 != 1", "Query": "select id from `user` where id = 42 union select id from `user` where id = 42", "Values": [ "42" ], "Vindex": "user_index" }, "TablesUsed": [ "user.user" ] }