[MDEV-32924] EXISTS-to-IN transformation can produce not-supported error Created: 2023-12-01 Updated: 2023-12-05 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.4 |
| Fix Version/s: | 10.4, 10.11 |
| Type: | Bug | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Sergei Petrunia |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | optimizer-easy | ||
| Description |
|
Look at testcase for
It is wrong that this query produces an error. Running the select with optimizer_switch='exists_to_in=off' produces no error.
The testcase is from The patch that has introduced the problem is the fix for
The problem is that it doesn't implement it correctly. If the first equality has a subselect and the second one doesn't, the code in find_inner_outer_equalities() still allows this. |
| Comments |
| Comment by Sergei Petrunia [ 2023-12-01 ] | ||||||||
|
Suppose we have
In this case, EXISTS-to-IN can pick either:
Its hard to make a cost-based choice here. and should we bother?
Will raise this on the optimizer call. |