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

ANY_VALUE function as a workaround for ONLY_FULL_GROUP_BY mode, SQL-2023-T626, and compatibility with MySQL 5.7

    XMLWordPrintable

Details

    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.


      See also MDEV-30766 where this function is needed for the query to return correct results

      Attachments

        Issue Links

          Activity

            People

              psergei Sergei Petrunia
              musicpanda Wim Roffel
              Votes:
              14 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.