diff options
author | Alexander Barkov <bar@mariadb.com> | 2019-10-29 13:33:38 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2019-10-29 13:33:38 +0400 |
commit | b62a846642c14eb6665b5ef0ce5c4de79555754a (patch) | |
tree | fdfbb4f06b11ffb8b7103195d36d51d38309de99 /plugin/type_inet/mysql-test/type_inet | |
parent | f1e9a0acc86050d2738de6c1b06747ff043d0808 (diff) | |
download | mariadb-git-b62a846642c14eb6665b5ef0ce5c4de79555754a.tar.gz |
MDEV-20913 sql_mode=ORACLE: INET6 does not work as a routine parameter type and return type
Adding the missing grammar.
Diffstat (limited to 'plugin/type_inet/mysql-test/type_inet')
-rw-r--r-- | plugin/type_inet/mysql-test/type_inet/type_inet6_oracle.result | 29 | ||||
-rw-r--r-- | plugin/type_inet/mysql-test/type_inet/type_inet6_oracle.test | 35 |
2 files changed, 64 insertions, 0 deletions
diff --git a/plugin/type_inet/mysql-test/type_inet/type_inet6_oracle.result b/plugin/type_inet/mysql-test/type_inet/type_inet6_oracle.result new file mode 100644 index 00000000000..8b041e45bea --- /dev/null +++ b/plugin/type_inet/mysql-test/type_inet/type_inet6_oracle.result @@ -0,0 +1,29 @@ +# +# Start of 10.5 tests +# +# +# MDEV-20913 sql_mode=ORACLE: INET6 does not work as a routine parameter type and return type +# +SET sql_mode=ORACLE; +CREATE OR REPLACE FUNCTION f1() RETURN INET6 AS +BEGIN +RETURN 'ffff::ffff'; +END; +$$ +SELECT f1(); +f1() +ffff::ffff +DROP FUNCTION f1; +SET sql_mode=ORACLE; +CREATE OR REPLACE FUNCTION f1(a INET6) RETURN INT AS +BEGIN +RETURN LENGTH(a); +END; +$$ +SELECT f1('0::0'); +f1('0::0') +2 +DROP FUNCTION f1; +# +# End of 10.5 tests +# diff --git a/plugin/type_inet/mysql-test/type_inet/type_inet6_oracle.test b/plugin/type_inet/mysql-test/type_inet/type_inet6_oracle.test new file mode 100644 index 00000000000..46754bf9fa5 --- /dev/null +++ b/plugin/type_inet/mysql-test/type_inet/type_inet6_oracle.test @@ -0,0 +1,35 @@ +--echo # +--echo # Start of 10.5 tests +--echo # + +--echo # +--echo # MDEV-20913 sql_mode=ORACLE: INET6 does not work as a routine parameter type and return type +--echo # + +SET sql_mode=ORACLE; +DELIMITER $$; +CREATE OR REPLACE FUNCTION f1() RETURN INET6 AS +BEGIN + RETURN 'ffff::ffff'; +END; +$$ +DELIMITER ;$$ +SELECT f1(); +DROP FUNCTION f1; + + +SET sql_mode=ORACLE; +DELIMITER $$; +CREATE OR REPLACE FUNCTION f1(a INET6) RETURN INT AS +BEGIN + RETURN LENGTH(a); +END; +$$ +DELIMITER ;$$ +SELECT f1('0::0'); +DROP FUNCTION f1; + + +--echo # +--echo # End of 10.5 tests +--echo # |