[MDEV-20409] With ONLY_FULL_GROUP_BY work don't correct. Created: 2019-08-22 Updated: 2019-08-27 Resolved: 2019-08-23 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | N/A |
| Affects Version/s: | 10.3.17 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Илья Индиго | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | group_concat, only_full_group_by | ||
| Environment: |
openSUSE Tumbleweed x86_64 |
||
| Issue Links: |
|
||||||||
| Description |
|
t1.title' isn't in GROUP BY QMYSQL3: Unable to prepare statement https://dev.mysql.com/doc/refman/8.0/en/group-by-handling.html
The query is valid if name is a primary key of t or is a unique NOT NULL column. In such cases, MySQL recognizes that the selected column is functionally dependent on a grouping column. For example, if name is a primary key, its value determines the value of address because each group has only one value of the primary key and thus only one row. As a result, there is no randomness in the choice of address value in a group and no need to reject the query. In my query, `t1`.`id` is the primary key, and all values after it in` t1`. * will be unique all! In the table `t1` there may be more than a hundred fields and they may change. There is no point in registering each in GROUP BY, it should be enough to register only the primary key! I consider this behavior a serious error! |
| Comments |
| Comment by Alice Sherepa [ 2019-08-23 ] |
|
Thanks for the report, currently MariaDB does not support functional dependency in ONLY_FULL_GROUP_BY mode (https://mariadb.com/kb/en/library/sql-mode/) |