Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5, 10.6, 10.11, 11.1(EOL), 11.2, 11.4, 10.4(EOL), 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 11.0(EOL), 11.3(EOL), 11.5(EOL)
Description
I create the following package with a private procedure and try to call the procedure from outside of the package:
SET sql_mode=ORACLE; |
CREATE OR REPLACE DATABASE db1; |
 |
DELIMITER $$
|
CREATE OR REPLACE PACKAGE db1.pkg AS |
PROCEDURE p1; |
END; |
$$
|
CREATE PACKAGE BODY db1.pkg AS |
PROCEDURE p0 AS BEGIN SELECT 5; END; |
PROCEDURE p1 AS BEGIN CALL p0(); END; |
END; |
$$
|
DELIMITER ;
|
USE db1; |
CALL pkg.p0() /* This fails, correct */; |
ERROR 1305 (42000): PROCEDURE pkg.p0 does not exist
|
The CALL statement correctly fails, because pkg.p0 is a private routine.
Now I use a 3-step procedure name notation:
CALL db1.pkg.p0() /* This succeeds, wrong */; |
+---+
|
| 5 |
|
+---+
|
| 5 |
|
+---+
|
The above is wrong. It should fail in the same way with the first CALL.
Attachments
Issue Links
- is caused by
-
MDEV-10591 Oracle-style packages
- Closed
- relates to
-
MDEV-32101 CREATE PACKAGE [BODY] for sql_mode=DEFAULT
- Closed