[MDEV-32793] Support for default values for PL/SQL procedure / function Created: 2021-06-24  Updated: 2023-11-30

Status: Open
Project: MariaDB Server
Component/s: PL/SQL
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Anders Karlsson Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: Compatibility, Oracle


 Description   

Oracle PL/SQL supports default values for parameters to procedures and functions, which is not supported by SQL/PL in MariaDB. This is a commonly used PL/SQL feature and looks like this, this works fine with Oracle but doesn't compile with MariaDB (excluding SQL_MODE and delimiter, obviously):

SET SQL_MODE=Oracle;
delimiter //
 
CREATE OR REPLACE PROCEDURE p1(a1 INTEGER := 1)
IS
   dummy INTEGER;
BEGIN
   SELECT a1 INTO dummy FROM dual;
END;
//
 
CREATE OR REPLACE FUNCTION f1(a1 INTEGER := 1)
RETURN INTEGER
IS
BEGIN
   RETURN a1;
END;
//


Generated at Thu Feb 08 10:34:03 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.