| Bug #100171 | Query not returning expected results | ||
|---|---|---|---|
| Submitted: | 9 Jul 2020 11:36 | Modified: | 9 Jul 2020 16:01 |
| Reporter: | JACK DAWSON | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Workbench | Severity: | S7 (Test Cases) |
| Version: | 8.0.15 | OS: | Windows (Microsoft Windows 8.1) |
| Assigned to: | MySQL Verification Team | CPU Architecture: | Any |
| Tags: | WBBugReporter | ||
[9 Jul 2020 16:01]
MySQL Verification Team
Hi, This is not a bug. If you configure your MySQL server with "ONLY_FULL_GROUP_BY" to behave by standard this query will be illegal. If you, on the other hand, do not configure "ONLY_FULL_GROUP_BY" the query will be allowed to execute but there is nothing that promisses that the "name" and the max() will be from the same column. What you want it something like: > select name,surfacearea from country order by surfacearea desc limit 1; +--------------------+-------------+ | name | surfacearea | +--------------------+-------------+ | Russian Federation | 17075400.00 | +--------------------+-------------+ 1 row in set (0.00 sec) all best Bogdan

Description: ----[For better reports, please attach the log file after submitting. You can find it in C:\Users\home\AppData\Roaming\MySQL\Workbench\log\wb.log] In the supplied world database, the following query... select name, max(surfacearea) from country ..returns 'Aruba', '17075400.00' ..when it should be 'Russian Federation' As an aside, I updated the link with 'com' reported here in wb.log: 06:33:42 [WRN][ grt]: C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules/data/mysql_rdbms_info.xml:1446: link 'om.mysql.rdbms.mysql.driver.native_sshtun' <object > key=owner could not be resolved How to repeat: use world; select name, max(surfacearea) from country