[MDEV-2538] LP:823169 - Diverging results with GROUP BY + NULL in ANY subquery Created: 2011-08-09 Updated: 2015-02-02 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Philip Stoev (Inactive) | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
The following 2 queries: SELECT a FROM t1 WHERE b < ANY ( SELECT b FROM t1 GROUP BY b ); are equivalent and yet they return identical results. The first query returns no rows, the second returns rows. Test case: CREATE TABLE t1 (a int(11), b varchar(1)); SELECT a FROM t1 WHERE b < ANY ( SELECT b FROM t1 GROUP BY b ); Repeatable in maria-5.3,maria-5.2, mysql-5.5 |
| Comments |
| Comment by Philip Stoev (Inactive) [ 2011-08-09 ] |
|
Diverging results with GROUP BY + NULL in ANY subquery SELECT a FROM t1 WHERE b < ANY ( SELECT b FROM t1 GROUP BY b ); are equivalent and yet they return identical results. The first query returns no rows, the second returns rows. Test case: CREATE TABLE t1 (a int(11), b varchar(1)); SELECT a FROM t1 WHERE b < ANY ( SELECT b FROM t1 GROUP BY b ); |
| Comment by Oleksandr Byelkin [ 2011-08-09 ] |
|
Re: Diverging results with GROUP BY + NULL in ANY subquery |
| Comment by Oleksandr Byelkin [ 2011-08-09 ] |
|
Re: Diverging results with GROUP BY + NULL in ANY subquery |
| Comment by Oleksandr Byelkin [ 2011-08-09 ] |
|
Re: Diverging results with GROUP BY + NULL in ANY subquery INSERT INTO t1 VALUES (2,NULL),(5,'d'),(7,'g'); |
| Comment by Oleksandr Byelkin [ 2011-08-09 ] |
|
Re: Diverging results with GROUP BY + NULL in ANY subquery |
| Comment by Oleksandr Byelkin [ 2011-08-09 ] |
|
Re: Diverging results with GROUP BY + NULL in ANY subquery |
| Comment by Oleksandr Byelkin [ 2011-08-09 ] |
|
Re: Diverging results with GROUP BY + NULL in ANY subquery |
| Comment by Timour Katchaounov (Inactive) [ 2011-08-11 ] |
|
Re: Diverging results with GROUP BY + NULL in ANY subquery |
| Comment by Oleksandr Byelkin [ 2011-08-30 ] |
|
Re: Diverging results with GROUP BY + NULL in ANY subquery CREATE TABLE t1 (a int(11), b varchar(1)); SELECT a FROM t1 WHERE b < ANY ( SELECT b FROM t1 GROUP BY b ); SELECT a FROM t1 WHERE b < ALL ( SELECT b FROM t1 GROUP BY b ); delete from t1; SELECT a FROM t1 WHERE b < ANY ( SELECT b FROM t1 GROUP BY b ); SELECT a FROM t1 WHERE b < ALL ( SELECT b FROM t1 GROUP BY b ); drop table t1; |
| Comment by Rasmus Johansson (Inactive) [ 2011-12-13 ] |
|
Launchpad bug id: 823169 |