Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A.* assumes every column in A is functionally dependent on the A.id. This may be the case, but is a huge source of bugs I have seen related to MySQL, and would set my spidey sense off if I saw it in code. The problem is that older versions of MySQL allowed non-functionaly dependent columns in the select list and would randomly put one of the values in the result set (every other sane database at the time properly errored out). At this point, I would consider it bad practice to run MySQL in anything other than only full group by mode.

See here: https://dev.mysql.com/doc/refman/5.7/en/group-by-handling.ht...

And here: https://www.percona.com/blog/2019/05/13/solve-query-failures...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: