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

ERROR 1222 for equal-width nested set operations inside EXISTS

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 12.3.2
    • N/A
    • Optimizer
    • None
    • Not for Release Notes

    Description

      Description

       
      MariaDB Server 12.3.2 reports that SELECT statements have different column counts when a two-column UNION ALL has a parenthesized INTERSECT operand inside EXISTS. Every SELECT actually has two columns.
       
      The set expression executes successfully outside EXISTS. A flat two-column UNION ALL and a nested single-column version also succeed inside EXISTS.
      

      How to repeat

       
      SELECT 1 AS result
      WHERE EXISTS (
          SELECT 1, 2
          UNION ALL
          (SELECT 3, 4 INTERSECT SELECT 5, 6)
      );
      

      Actual result

      ERROR 1222 (21000): The used SELECT statements have a different number of columns
      
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              chen7897 cl hl
              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.