[MDEV-4126] MySQL:68254 - wrong result with non-deterministic GROUP BY in subquery Created: 2013-02-02 Updated: 2022-12-02 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.1, 5.5.29, 5.3.12, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10 |
| Fix Version/s: | 5.5, 10.3 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Elena Stepanova | Assignee: | Sergei Petrunia |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | 11.0-sel, upstream | ||
| Description |
|
The bug was originally filed by a user at bugs.mysql.com. It's reproducible on MySQL 5.6 as well as MariaDB 5.3-10.0. See the original description, including the test case, and the suggested patch in http://bugs.mysql.com/bug.php?id=68254 (I don't know if I may copy-paste it). The major complaint is that if table t1 has rows
then, while a query
returns
The query
returns rows with y IN (1,2,3,4). I've set it to Minor for now, because the query with GROUP BY is indeterministic according to MySQL documentation, so I don't see that much value in using it as a subquery; but it's still a bug since the subquery is supposed to return 2 values, not 4, even it can be any of (1,2), (1,3) or (1,4). MySQL has verified the bug, although I don't know if they're going to fix it, and how. |
| Comments |
| Comment by Patryk Pomykalski [ 2013-02-26 ] |
|
Strange, semijoin requirements have: 3. Subquery does not have GROUP BY or ORDER BY in code: but it still uses semijoin? |