Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.5
-
None
Description
The below CREATE FUNCTION statements understand INET6 in both parameter list and in the RETURNS clause
SET sql_mode=''; |
CREATE OR REPLACE FUNCTION f1() RETURNS INET6 RETURN NULL; |
CREATE OR REPLACE FUNCTION f1(a INET6) RETURNS INT RETURN NULL; |
Equivalent CREATE FUNCTION statements in sql_mode=ORACLE return a syntax error:
SET sql_mode=ORACLE; |
DELIMITER $$
|
CREATE OR REPLACE FUNCTION f1() RETURN INET6 AS |
BEGIN
|
RETURN NULL; |
END; |
$$
|
DELIMITER ;
|
ERROR 1064 (42000): You have an error in your SQL syntax ... near 'INET6 AS
|
BEGIN
|
RETURN NULL;
|
END' at line 1
|
SET sql_mode=ORACLE; |
DELIMITER $$
|
CREATE OR REPLACE FUNCTION f1(a INET6) RETURN INT AS |
BEGIN
|
RETURN NULL; |
END; |
$$
|
DELIMITER ;
|
ERROR 1064 (42000): You have an error in your SQL syntax ... near ') RETURN INT AS
|
BEGIN
|
RETURN NULL;
|
END' at line 1
|
Attachments
Issue Links
- blocks
-
MDEV-12518 Unify sql_yacc.yy and sql_yacc_ora.yy
- Closed