summaryrefslogtreecommitdiff
path: root/plugin/type_inet/mysql-test/type_inet/type_inet4_oracle.test
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/type_inet/mysql-test/type_inet/type_inet4_oracle.test')
-rw-r--r--plugin/type_inet/mysql-test/type_inet/type_inet4_oracle.test35
1 files changed, 35 insertions, 0 deletions
diff --git a/plugin/type_inet/mysql-test/type_inet/type_inet4_oracle.test b/plugin/type_inet/mysql-test/type_inet/type_inet4_oracle.test
new file mode 100644
index 00000000000..3ff2fe0fcc6
--- /dev/null
+++ b/plugin/type_inet/mysql-test/type_inet/type_inet4_oracle.test
@@ -0,0 +1,35 @@
+--echo #
+--echo # Start of 10.10 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 INET4 AS
+BEGIN
+ RETURN '255.255.255.255';
+END;
+$$
+DELIMITER ;$$
+SELECT f1();
+DROP FUNCTION f1;
+
+
+SET sql_mode=ORACLE;
+DELIMITER $$;
+CREATE OR REPLACE FUNCTION f1(a INET4) RETURN INT AS
+BEGIN
+ RETURN LENGTH(a);
+END;
+$$
+DELIMITER ;$$
+SELECT f1('000.000.000.000');
+DROP FUNCTION f1;
+
+
+--echo #
+--echo # End of 10.10 tests
+--echo #