Since version 5.7.5 Mysql has the "ONLY_FULL_GROUP_BY" flag by default enabled and I am trying to make some software that I maintain to be compatible with that.
The most clean way to achieve that is with the ANY_VALUE() function. If you give a query like
SELECT ANY_VALUE(var1), ANY_VALUE(var2), color FROM mybase GROUP BY color
Mysql will not complain that var1 and var2 are not determined.
Unfortunately when I use this under MariaDb I get the following error:
MySQL error 1728: Cannot load from mysql.proc. The table is probably corrupted
As soon as you remove the ANY_VALUE the error disappears - so it must be related to this function.