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
-
Activity
Field | Original Value | New Value |
---|---|---|
Summary | sql_mode=ORACLE: INET6 does not work as an routine parameter type and return type | sql_mode=ORACLE: INET6 does not work as a routine parameter type and return type |
Description |
The below CREATE FUNCTION statements understand INET6 in both parameter list and in the RETURNS clause
{code:sql} SET sql_mode=''; CREATE OR REPLACE FUNCTION f1() RETURNS INET6 RETURN NULL; CREATE OR REPLACE FUNCTION f1(a INET6) RETURNS INT RETURN NULL; {code} Equivalent function in sql_mode=ORACLE return a syntax error: {code:sql} SET sql_mode=ORACLE; DELIMITER $$ CREATE OR REPLACE FUNCTION f1() RETURN INET6 AS BEGIN RETURN NULL; END; $$ DELIMITER ; {code} {noformat} ERROR 1064 (42000): You have an error in your SQL syntax ... near 'INET6 AS BEGIN RETURN NULL; END' at line 1 {noformat} {code:sql} SET sql_mode=ORACLE; DELIMITER $$ CREATE OR REPLACE FUNCTION f1(a INET6) RETURN INT AS BEGIN RETURN NULL; END; $$ DELIMITER ; {code} {noformat} ERROR 1064 (42000): You have an error in your SQL syntax ... near ') RETURN INT AS BEGIN RETURN NULL; END' at line 1 {noformat} |
The below CREATE FUNCTION statements understand INET6 in both parameter list and in the RETURNS clause
{code:sql} SET sql_mode=''; CREATE OR REPLACE FUNCTION f1() RETURNS INET6 RETURN NULL; CREATE OR REPLACE FUNCTION f1(a INET6) RETURNS INT RETURN NULL; {code} Equivalent CREATE FUNCTION statements in sql_mode=ORACLE return a syntax error: {code:sql} SET sql_mode=ORACLE; DELIMITER $$ CREATE OR REPLACE FUNCTION f1() RETURN INET6 AS BEGIN RETURN NULL; END; $$ DELIMITER ; {code} {noformat} ERROR 1064 (42000): You have an error in your SQL syntax ... near 'INET6 AS BEGIN RETURN NULL; END' at line 1 {noformat} {code:sql} SET sql_mode=ORACLE; DELIMITER $$ CREATE OR REPLACE FUNCTION f1(a INET6) RETURN INT AS BEGIN RETURN NULL; END; $$ DELIMITER ; {code} {noformat} ERROR 1064 (42000): You have an error in your SQL syntax ... near ') RETURN INT AS BEGIN RETURN NULL; END' at line 1 {noformat} |
Link |
This issue blocks |
issue.field.resolutiondate | 2019-10-29 09:34:32.0 | 2019-10-29 09:34:32.985 |
Fix Version/s | 10.5.0 [ 23709 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 100648 ] | MariaDB v4 [ 156908 ] |