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

[DRAFT] Support external references in derived tables

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      A motivating example of the CONNECT BY task includes a subquery with outer
      references:

      WHERE description LIKE :1
          AND type = ?
          AND status = ?
          AND EXISTS (
              SELECT ?
              FROM smt_group
              WHERE groupid = :2
              START WITH groupid = a.groupid
              CONNECT BY PRIOR parentid = groupid
          )
      

      A problem with outer references comes from this:

      • Recursive CTEs syntax uses derived tables
      • The internal representation of Recursive CTEs also uses derived tables
      • Derived tables currently do not have/support outer references
      • If CONNECT BY is parsed into the same internal representation as Recursive CTEs, then we will need to internally support derived tables with outer references.

      Attached is a patch by igor which adds support for outside references in the parser.

      The execution part is not done yet, though. This task is about adding support for query execution.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              psergei Sergei Petrunia
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.