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

LP:715062 - Wrong result with VIEW + UNION + subquery in maria-5.3-mwl89

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      Using unions inside views inside subqueries causes non-matching rows to be returned in maria-5.3-mwl89. Not repeatable in maria-5.3.

      SET SESSION optimizer_switch = 'in_to_exists=on,semijoin=off,materialization=on';
      CREATE VIEW v1 AS SELECT 2 UNION SELECT 2 ;
      SELECT 'bug' FROM DUAL WHERE ( 5 ) IN ( SELECT * FROM v1 ) ;

      In this case, the IN predicate in the WHERE is obviously FALSE, however the 'bug' row is still returned.

      bzr version-info:

      revision-id: <email address hidden>
      date: 2011-02-03 17:00:28 +0200
      build-date: 2011-02-08 10:55:54 +0200
      revno: 2883
      branch-nick: maria-5.3-mwl89

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            timour Timour Katchaounov added a comment -

            Re: Wrong result with VIEW + UNION + subquery in maria-5.3-mwl89
            Pushed only the test case. Not repeatable in the latest 5.3-mwl89:

            revno: 2962 [merge]
            committer: timour@askmonty.org
            branch nick: 5.3-mwl89
            timestamp: Fri 2011-04-01 15:42:59 +0300
            message:
            MWL#89

            • Auto-merge with 5.3 main.
            • Changed the test for LP BUG#719198 so that
              an two more queries were added, and removed a
              query that produces a wrong result due to an
              unrelated problem. The wrong result is submitted
              as a separate bug.
            Show
            timour Timour Katchaounov added a comment - Re: Wrong result with VIEW + UNION + subquery in maria-5.3-mwl89 Pushed only the test case. Not repeatable in the latest 5.3-mwl89: revno: 2962 [merge] committer: timour@askmonty.org branch nick: 5.3-mwl89 timestamp: Fri 2011-04-01 15:42:59 +0300 message: MWL#89 Auto-merge with 5.3 main. Changed the test for LP BUG#719198 so that an two more queries were added, and removed a query that produces a wrong result due to an unrelated problem. The wrong result is submitted as a separate bug.
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 715062

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 715062

              People

              • Assignee:
                timour Timour Katchaounov
                Reporter:
                philipstoev Philip Stoev
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: