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

Incoherent result subqueries & materialization switch

    XMLWordPrintable

Details

    Description

      Create a db from the attached dump file, the following select gives a wrong result

      MariaDB [jira]> select fkey from t1 where fkey in (select distinct f4 from t2 where f1=147 and f5='S') order by fkey;
      ------

      fkey

      ------

      267
      267
      267
      267
      267
      267
      267
      267
      267

      ------

      If I switch off materialization adding the following line to the my.cnf file

      optimizer_switch='materialization=off'

      the result is correct

      ------

      fkey

      ------

      90
      93
      261
      262
      263
      264
      265
      266
      267

      ------

      Thanks

      Attachments

        Activity

          People

            Unassigned Unassigned
            robertoghidini Roberto Ghidini
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.