[MDEV-27442] Wrong result upon query with DISTINCT and EXISTS subquery Created: 2022-01-07 Updated: 2022-02-09 Resolved: 2022-02-08 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.5, 10.6, 10.7 |
| Fix Version/s: | 10.5.15, 10.6.7, 10.7.3, 10.8.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Michael Widenius |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This is naturally wrong, 100 should also be there. The failure appeared in 10.5 branch after this commit in 10.5.3:
|
| Comments |
| Comment by Michael Widenius [ 2022-02-01 ] |
|
This has nothing to do with my commit. CREATE TABLE t1 (a int, b int, KEY b (b,a)) ENGINE=MyISAM; |
| Comment by Michael Widenius [ 2022-02-08 ] |
|
The problem was that get_best_group_min_max() did not check if fields used Fixed by also traversing the sub queries when checking if a field is used. Fix created by Sergei Petrunia |