Bug #42810 | min() messes up | ||
---|---|---|---|
Submitted: | 12 Feb 2009 22:31 | Modified: | 13 Feb 2009 0:02 |
Reporter: | Edward Strinden | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: Command-line Clients | Severity: | S2 (Serious) |
Version: | 5.1.31 | OS: | Windows (NT) |
Assigned to: | CPU Architecture: | Any | |
Tags: | GROUP BY, min(), three columns |
[12 Feb 2009 22:31]
Edward Strinden
[13 Feb 2009 0:02]
MySQL Verification Team
Thank you for the bug report. Duplicate of bug: http://bugs.mysql.com/bug.php?id=13160: Additional Info: http://dev.mysql.com/doc/refman/5.1/en/group-by-hidden-columns.html "Do not use this feature if the columns you omit from the GROUP BY part are not constant in the group. The server is free to return any value from the group, so the results are indeterminate unless all values are the same." mysql> set sql_mode = ONLY_FULL_GROUP_BY; Query OK, 0 rows affected (0.00 sec) mysql> SELECT article, min(price) as price, dealer -> FROM shop -> GROUP BY article; ERROR 1055 (42000): 'test.shop.dealer' isn't in GROUP BY