PL/SQL parser (MDEV-10142)

[MDEV-12107] sql_mode=ORACLE: Inside routines the CALL keywoard is optional Created: 2017-02-22  Updated: 2020-08-27  Resolved: 2017-02-22

Status: Closed
Project: MariaDB Server
Component/s: Parser, Stored routines
Affects Version/s: None
Fix Version/s: 10.3.0

Type: Technical task Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: Compatibility

Sprint: 10.2.2-3, 10.2.2-1, 10.2.2-2, 10.2.2-4, 10.1.18

 Description   

Normally, a stored procedure call is done using this syntax:

  CALL p1(10);
  CALL p2;
  CALL test.p1(10);
  CALL test.p2;

However, when we want to call a stored procedure from another routine or an anonymous block, the keyword CALL is optional. We'll fix the parser to understand this syntax.

Example:

SET sql_mode=ORACLE;
DELIMITER /
CREATE OR REPLACE PROCEDURE p1(a INT) AS
BEGIN
  NULL;
END;
/
CREATE OR REPLACE PROCEDURE p2 AS
BEGIN
  NULL;
END;
/
BEGIN
  p1(10);
  p2;
  test.p1(10);
  test.p2(10);
END;
/



 Comments   
Comment by Alexander Barkov [ 2017-02-22 ]

Pushed to bb-10.2-compatibility

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