Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
Description
Under terms of MDEV-19632 we're introducing qualified data types, e.g.:
SET sql_mode=ORACLE; |
CREATE TABLE t1 (a mariadb_schema.DATE); |
This syntax is needed for disambiguation.
In stored routines this syntax is not needed for disambiguation, because sql_mode is stored together with the SP definition, so data types are unambiguously parsed according to the SP sql_mode.
Anyway, for symmetry purposes, let's add qualified syntax inside SP definitions, to make qualified types work in:
- Function return type
SET sql_mode=ORACLE;
DELIMITER $$
CREATE FUNCTION f1() RETURN mariadb_schema.DATE AS
BEGIN
RETURN CURRENT_DATE;
END;
$$
DELIMITER ;
- Parameter type
SET sql_mode=ORACLE;
DELIMITER $$
CREATE PROCEDURE p1(a mariadb_schema.DATE) AS
BEGIN
NULL;
END;
$$
DELIMITER ;
- Local variable type
SET sql_mode=ORACLE;
DELIMITER $$
CREATE PROCEDURE p1() AS
a mariadb_schema.DATE;
BEGIN
NULL;
END;
$$
DELIMITER ;
Attachments
Issue Links
- relates to
-
MDEV-12252 ROW data type for stored function return values
- Closed
-
MDEV-19632 Replication aborts with ER_SLAVE_CONVERSION_FAILED upon CREATE ... SELECT in ORACLE mode
- Closed
-
MDEV-23023 Put compatibility functions and data types into namespaces
- Open