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

"Duplicate column name" while using VALUES table constructor

    XMLWordPrintable

Details

    • Not for Release Notes
    • Q3/2026 Server Maintenance, Q3/2026 Server Development, Q4/2026 Server Maintenance

    Description

      If the table, constructed via VALUES() has multiple columns and some values are identical, then we get the same column names:

       
      MariaDB [test]> SELECT *  from  (VALUES (1,1),(2,2)) t;
      ERROR 1060 (42S21): Duplicate column name '1'
       
      MariaDB [test]> SELECT *  from  (VALUES (1,2),(2,2)) t;
      +---+---+
      | 1 | 2 |
      +---+---+
      | 1 | 2 |
      | 2 | 2 |
      +---+---+
      2 rows in set (0.000 sec)
      
      

      Attachments

        Issue Links

          Activity

            People

              Johnston Rex Johnston
              alice Alice Sherepa
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0.75d Original Estimate - 0.75d
                  0.75d
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 1d
                  1d

                  Git Integration

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