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

%TYPE not working for function return values

Details

    Description

      Using %TYPE for a return value from a PL/SQL function fails with MariaDB, but works as expected in Oracle. Like this:

      DROP TABLE tab1;
      CREATE TABLE tab1(c1 INTEGER);
       
      CREATE OR REPLACE FUNCTION f1
        RETURN tab1.c1%TYPE
      AS
      BEGIN
         RETURN 1;
      END;
      /
      

      With Oracle this works without errors. With MariaDB I get:
      ERROR 1064 (42000) at line 1 in file...

      %TYPE declarations works for function and procedure parameters in both Oracle and MariaDB

      Attachments

        Issue Links

          Activity

            karlsson Anders Karlsson created issue -
            alice Alice Sherepa made changes -
            Field Original Value New Value
            alice Alice Sherepa made changes -
            Fix Version/s N/A [ 14700 ]
            Resolution Duplicate [ 3 ]
            Status Open [ 1 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 89083 ] MariaDB v4 [ 154850 ]

            People

              Unassigned Unassigned
              karlsson Anders Karlsson
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.