Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
None
-
Can result in unexpected behaviour
Description
MariaDB supports RECORD and associative array data type definitions inside routines.
However, RECORD and associative array declarations were forgotten in PACKAGE BODY.
Under terms of this tasks we'll also allow type definitions inside PACKAGE BODY, to make this work:
SET sql_mode=ORACLE; |
DELIMITER $$
|
CREATE OR REPLACE PACKAGE pkg1 AS |
PROCEDURE p1; |
END; |
$$
|
CREATE OR REPLACE PACKAGE BODY pkg1 AS |
TYPE record_t IS RECORD (a INT, b VARCHAR(32)); |
TYPE assoc_t IS TABLE OF record_t INDEX BY INT; |
PROCEDURE p1 AS |
a assoc_t;
|
BEGIN |
a(10):= record_t(10,'test'); |
SELECT a(10).a, a(10).b; |
END; |
END; |
$$
|
DELIMITER ;
|
 |
CALL pkg1.p1;
|
+---------+---------+
|
| a(10).a | a(10).b |
|
+---------+---------+
|
| 10 | test |
|
+---------+---------+
|
Attachments
Issue Links
- blocks
-
MDEV-19149 System package SYS.DBMS_OUTPUT
-
- Closed
-
- is blocked by
-
MDEV-34317 DECLARE TYPE type_name IS RECORD (..) with scalar members in stored routines
-
- Closed
-
-
MDEV-34319 Associative arrays: DECLARE TYPE .. TABLE OF .. INDEX BY in stored routines
-
- Closed
-