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

Incorrect results for INTERSECT ALL in ORACLE mode

    XMLWordPrintable

Details

    • Bug
    • Status: In Review (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 10.11, 11.4, 11.8
    • 10.11, 11.4, 11.8
    • Optimizer
    • None
    • Unexpected results
    • Q4/2025 Server Maintenance, Q1/2026 Server Maintenance

    Description

      main.intersect_all has incorrect results.

      In particular,
      1.

      select * from t1 intersect all select * from t2 union values (1, 2);
      select * from t1 intersect all (select * from t2 union values (1, 2));
      (select * from t1 intersect all select * from t2) union values (1, 2);
      

      The result of the first query must match the result of the second or the result of the third. Now it returns something different.

      2.
      One cannot simply document that don't use views in oracle mode, they aren't supported and don't work, because "VIEW is stored and executed normal mode (see Sql_mode_save_for_frm_handling)". Views must work, if they don't — it should be fixed.

      The test and the above comment were added in MDEV-25158, but the bug itself is not caused by MDEV-25158, it is present in 10.11 releases

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              serg Sergei Golubchik
              Oleksandr Byelkin Oleksandr Byelkin
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.