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

Please support new ON DUPLICATE KEY UPDATE col=alias.col syntax

    XMLWordPrintable

Details

    Description

      Here: https://dev.mysql.com/doc/refman/8.0/en/insert-on-duplicate.html

      MySQL 8.2 declares the use of VALUES() to be deprecated in statements like this.

      INSERT INTO tbl (id, col) 
        VALUES (1,'value')
      ON DUPLICATE KEY UPDATE col=VALUES(col)
      

      In their 8.20+ they specify the use of aliases like this.

      INSERT INTO tbl (id, col) 
        VALUES (1,'value') AS alias
      ON DUPLICATE KEY UPDATE col=alias.col
      

      It would be helpful (to the WordPress project among others) to avoid needing two different syntaxes in order to support both MariaDB and MySQL.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              OllieJones Oliver Jones
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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