[MDEV-245] Exists2In: Wrong result (extra rows) with exists_to_in=ON, materialization=OFF, NOT EXISTS subquery Created: 2012-05-02 Updated: 2012-07-18 Resolved: 2012-07-18 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 10.0.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
The following query
on the test data returns 3 rows if executed with exists_to_in=on, materialization=off, and 2 rows otherwise. The correct result is 2 rows. bzr version-info
optimizer_switch (default + exists_to_in=on + materialization=off):
EXPLAIN with optimizer_switch = default + exists_to_in=on + materialization=off (wrong result):
EXPLAIN with optimizer_switch = default + exists_to_in=off + materialization=off (correct result):
Test case:
Expected result:
Actual result:
|
| Comments |
| Comment by Oleksandr Byelkin [ 2012-07-17 ] |
|
SET should be: |
| Comment by Oleksandr Byelkin [ 2012-07-18 ] |
|
The problem is that cache object from outer query firld was not updated. <cache>(`test`.`t1`.`a`) - this one |
| Comment by Oleksandr Byelkin [ 2012-07-18 ] |
|
The problem is that Item_in_optimizer excluded from execution chain... |
| Comment by Oleksandr Byelkin [ 2012-07-18 ] |
|
fixed |