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

support of brackets (parentheses) in UNION/EXCEPT/INTERSECT operations

Details

    • Task
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.4.0
    • Parser
    • None
    • 10.1.32, 10.3.6-1, 10.4.0-1

    Description

      Add suport of brackets which mean priority of operation in the parser:

      ((SELECT a from t1) union (SELECT b from t2)) intersect (select c from t3)

      Attachments

        Issue Links

          Activity

            The idea is for now do not touch SELECT_LEX in LEX, but make one function which "allocate" SELECT_LEX which will be aware about presence of pre-allocated SELECT_LEX.

            sanja Oleksandr Byelkin added a comment - The idea is for now do not touch SELECT_LEX in LEX, but make one function which "allocate" SELECT_LEX which will be aware about presence of pre-allocated SELECT_LEX.

            TODO: Need examples of pushing derived. (sql_derived.cc pushdown)

            sanja Oleksandr Byelkin added a comment - TODO: Need examples of pushing derived. (sql_derived.cc pushdown )
            sanja Oleksandr Byelkin added a comment - - edited

            TODO: Reursive CTE (before opening check)

            (According standard: UNION and left part of EXCEPT)

            sanja Oleksandr Byelkin added a comment - - edited TODO: Reursive CTE (before opening check) (According standard: UNION and left part of EXCEPT)

            Result of discussion:
            1. INTO:
            1.1 standard variant with SINGLE select and INTO after select list
            1.2 tail INTO after all SELECT query with warning about deprecating syntax
            2. lock options: as is - belong to each SELECT
            3. SELECT options with after parsing check
            4. ORDER BY as in standard. It is already implemented syntactically but should be added execution of several tail ORDER/LIMIT constructions.

            sanja Oleksandr Byelkin added a comment - Result of discussion: 1. INTO: 1.1 standard variant with SINGLE select and INTO after select list 1.2 tail INTO after all SELECT query with warning about deprecating syntax 2. lock options: as is - belong to each SELECT 3. SELECT options with after parsing check 4. ORDER BY as in standard. It is already implemented syntactically but should be added execution of several tail ORDER/LIMIT constructions.

            People

              sanja Oleksandr Byelkin
              sanja Oleksandr Byelkin
              Votes:
              0 Vote for this issue
              Watchers:
              7 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.