[MDEV-17057] %TYPE not working for function return values Created: 2018-08-24  Updated: 2018-08-24  Resolved: 2018-08-24

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Procedure
Affects Version/s: 10.3.7
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Anders Karlsson Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Environment:

CentOS 7.4


Issue Links:
Duplicate
duplicates MDEV-11210 %TYPE in stored function RETURN data ... Open

 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



 Comments   
Comment by Alice Sherepa [ 2018-08-24 ]

%TYPE in function RETURN clause is not supported yet

Generated at Thu Feb 08 08:33:35 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.