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

Error "Duplicate column name" while using VALUES table constructor

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9
    • 10.4, 10.5, 10.6
    • None
    • None

    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

            igor Igor Babaev
            alice Alice Sherepa
            Votes:
            1 Vote for this issue
            Watchers:
            4 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.