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

ALL and DISTINCT don't work for EXCEPT and INTERSECT anymore

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.4.6
    • 10.4.9
    • Optimizer
    • None
    • linux, built from sources.

    Description

      EXCEPT DISTINCT and INTERSECT DISTINCT yield an error (but it worked in 10.3.7, see script below).

      Also, the error message for EXCEPT ALL and INTERSECT ALL has changed (previously, it understood the syntax and gave a very specific error message, now it is a generic parser error message).

      UNION is not affected.

      To reproduced, run the following script in 10.3.7 and 10.4.6.

      CREATE TABLE demo (id INTEGER);
       
      INSERT INTO demo VALUES (1);
       
      SELECT * FROM demo
      EXCEPT
      SELECT * FROM demo;
       
      SELECT * FROM demo
      EXCEPT DISTINCT
      SELECT * FROM demo;
       
      SELECT * FROM demo
      EXCEPT ALL
      SELECT * FROM demo;
       
       
       
      SELECT * FROM demo
      INTERSECT
      SELECT * FROM demo;
       
      SELECT * FROM demo
      INTERSECT DISTINCT
      SELECT * FROM demo;
       
      SELECT * FROM demo
      INTERSECT ALL
      SELECT * FROM demo;
       
      -- DROP TABLE demo;
      

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            Markus Winand Markus Winand
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.