[MDEV-2842] LP:938518 - HAVING does not reject the result of aggregation Created: 2012-02-22 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: | Major |
| Reporter: | Igor Babaev | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
Using mariadb-5.2 create and populate table 1 with the following commands: CREATE TABLE t1 (pk INT PRIMARY KEY, a INT); Execute the following queries: The first query return the right result while the second query returns a wrong result: MariaDB [test]> SELECT MIN(t.pk) FROM t1, t1 as t WHERE t1.pk = 1;
-----------
----------- MariaDB [test]> SELECT MIN(t.pk) FROM t1, t1 as t WHERE t1.pk = 1 HAVING MIN(t.pk) < 10;
-----------
----------- |
| Comments |
| Comment by Rasmus Johansson (Inactive) [ 2012-02-25 ] |
|
Launchpad bug id: 938518 |