Details
-
New Feature
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
We have anchored data types declarations support since 10.3.3 and MDEV-14139. But while this kind of use for them works:
MariaDB [test]> delimiter //
|
MariaDB [test]> create procedure prt(OUT a row type of mysql.user) begin select *
|
into a from mysql.user limit 1; end;//
|
Query OK, 0 rows affected (0.156 sec)
|
|
MariaDB [test]> create procedure use_prt() begin declare b row type of mysql.user; call prt(b); select b.user, b.host; end;//
|
Query OK, 0 rows affected (0.192 sec)
|
|
MariaDB [test]> call use_prt()//
|
+-------------+-----------+
|
| b.user | b.host |
|
+-------------+-----------+
|
| mariadb.sys | localhost |
|
+-------------+-----------+
|
1 row in set (0.012 sec)
|
|
Query OK, 1 row affected (0.012 sec)
|
we have no way to return to a user variable:
MariaDB [test]> call prt(@a)//
|
ERROR 1241 (21000): Operand should contain 1 column(s)
|
and this makes a feature incomplete and even misleading. It would make sense to let user variables be of record types and rely on anchored types declarations, both for compatibility and consistency.