Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-10764 PL/SQL parser - Phase 2
  3. MDEV-34944

Implement anchored data types in ROW members

    XMLWordPrintable

Details

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

    Description

      Lets implement anchored data types inside a ROW():

      • references to table columns
      • references to SP variables

      Example with sql_mode=DEFAULT:

      CREATE OR REPLACE TABLE t1 (a INT, b VARCHAR(10));
      DELIMITER $$
      CREATE OR REPLACE PROCEDURE p1()
      BEGIN
        DECLARE x ROW(a TYPE OF t.a, b TYPE OF t1.b) DEFAULT ROW(1,'a');
        SELECT x.a, x.b;
      END;
      $$
      DELIMITER ;
      CALL p1;
      

      Example with sql_mode=ORACLE:

      SET sql_mode=ORACLE;
      CREATE OR REPLACE TABLE t1 (a INT, b VARCHAR(10));
      DELIMITER $$
      CREATE OR REPLACE PROCEDURE p1 AS
        x ROW(a TYPE OF t.a, b TYPE OF t1.b) DEFAULT ROW(1,'a');
      BEGIN
        SELECT x.a, x.b;
      END;
      $$
      DELIMITER ;
      CALL p1;
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.