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

Large IN expression may fail with 'duplicate column name'

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.3.10
    • 10.3.11
    • Optimizer
    • None

    Description

      The following query will return all records from the table. It will work just fine. However, once the IN's haystack becomes sufficiently large (e.g. >500 items), then an error message is given "#1060 - Duplicate column name 'aaaaa'". I suppose MariaDB creates a temporary internally and uses the searched expressions as column names. As we can see, this may fail.

      SELECT ALL * FROM `test_table_schema`.`test_table`
      WHERE
      (
      (
      'aaaaa',
      'aaaaa'
      )
      )
      IN
      (
      (
      'aaaaa',
      'aaaaa'
      ),
      (
      'aaaaa',
      'aaaaa'
      )
      )

      Attachments

        Activity

          People

            alice Alice Sherepa
            user2180613 Remy Fox
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.