Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.6.3
-
None
-
None
-
Linux CentOS 7.9
Description
You cannot in MariaDB call functions and procedures that exist in a different schema than the one where the package is created.
SET SQL_MODE=ORACLE; |
|
CREATE DATABASE IF NOT EXISTS test; |
CREATE DATABASE IF NOT EXISTS test2; |
USE test |
|
delimiter //
|
CREATE OR REPLACE PACKAGE pkg1 |
AS
|
FUNCTION func1() RETURN INTEGER; |
PROCEDURE proc1(); |
END
|
//
|
|
CREATE OR REPLACE PACKAGE BODY pkg1 |
IS
|
FUNCTION func1() |
RETURN INTEGER |
IS |
BEGIN |
RETURN 1; |
END; |
|
PROCEDURE proc1() |
IS |
BEGIN |
SELECT 2; |
END; |
END
|
//
|
|
delimiter ;
|
|
SELECT pkg1.func1(); |
CALL pkg1.proc1;
|
USE test2 |
SELECT test.pkg1.func1(); |
CALL test.pkg1.proc1();
|
This is valid syntax for Packages in Oracle.
Attachments
Issue Links
- relates to
-
MDEV-10591 Oracle-style packages
- Closed