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

LP:611382 - RQG: Query returns extra rows when executed with materialization=on

    XMLWordPrintable

    Details

      Description

      The following query returns extra rows when executed in maria 5.3 with semijoin=off. If the query is executed with semijoin=on, or if it is executed on 5.2 or with the subquery manually inlined, no rows are returned.

      SELECT table2 .`col_date_key`
      FROM BB table1 JOIN ( C table2 JOIN CC table3 ON table3 .`col_varchar_key` = table2 .`col_varchar_nokey` )
      ON table3 .`col_varchar_key` = table2 .`col_varchar_key`
      WHERE table1 .`col_varchar_nokey` IN (
      SELECT `col_varchar_nokey`
      FROM C ) ;

      The EXPLAIN plan does not specify what optimization strategy was chosen instead of semijoin.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: