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

"Duplicate column name" while using VALUES table constructor

    XMLWordPrintable

Details

    • Bug
    • Status: In Progress (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.3(EOL), 10.4(EOL), 10.5(EOL), 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 12.1(EOL)
    • 11.8, 12.3, 13.0, 13.1
    • None
    • Q3/2026 Server Maintenance, Q3/2026 Server Development

    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

        Activity

          People

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

            Dates

              Created:
              Updated:

              Time Tracking

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

                Git Integration

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