Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
12.1(EOL), 12.2, 12.3, 13.0, 13.1
-
None
-
Can result in unexpected behaviour
Description
A syntax error happens when parsing this package definition:
SET sql_mode=ORACLE; |
 |
DELIMITER $$
|
CREATE OR REPLACE PACKAGE pkg1 AS |
PROCEDURE p1; |
END; |
$$
|
CREATE OR REPLACE PACKAGE BODY pkg1 AS |
TYPE assoc_t IS TABLE OF INTEGER INDEX BY INTEGER; |
assoc0 assoc_t;
|
PROCEDURE p1 AS |
BEGIN |
assoc0(0):= 10;
|
SELECT assoc0.exists(0); |
END; |
END; |
$$
|
DELIMITER ;
|
CALL pkg1.p1;
|
ERROR 1630 (42000) at line 19: FUNCTION assoc0.exists does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
|
The error is wrong, this script should work. Note, it works if I move the variable definition from the PACKAGE BODY to the package procedure p1.
Attachments
Issue Links
- blocks
-
MDEV-19635 System package SYS.DBMS_SQL
-
- Open
-
- is caused by
-
MDEV-34319 Associative arrays: DECLARE TYPE .. TABLE OF .. INDEX BY in stored routines
-
- Closed
-
- relates to
-
MDEV-39045 SHOW PROCEDURE CODE crashes in a package with a body wide assoc array
-
- Open
-