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

Extend check_equality_for_exist2in() to cover inner table expressions

    XMLWordPrintable

Details

    Description

      The function check_equality_for_exist2in() used for picking out equalities for the exists-to-in transformation only "Check if 'func' is an equality in form "inner_table.column = outer_expr"". Extend this so that it checks "inner_expr = outer_expr".

      Note that there may be issues when inner_expr is a row, as for example

      exists (select * from it where ((it.a, it.b), it.c) = ((ot.a, ot.b), ot.c))
      =>
      ((ot.a, ot.b), ot.c) in (select ((it.a, it.b), it.c) from it)

      is illegal because we can't select like this.

      Thus for starters, perhaps limit it to scalar expressions only.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ycp Yuchen Pei
              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.