Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-10426

ANY_VALUE function as a workaround for ONLY_FULL_GROUP_BY mode and compatibility with MySQL 5.7

    Details

    • Type: Task
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                musicpanda Wim Roffel
              • Votes:
                8 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated: