summaryrefslogtreecommitdiffstats
path: root/plugin/type_inet
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 13:39:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 13:39:13 +0000
commit86fbb58c3ac0865482819c10a3e81f2eea001c36 (patch)
tree28c9e526ea739c6f9b89e36115e1e2698bddf981 /plugin/type_inet
parentReleasing progress-linux version 1:10.11.6-2~progress7.99u1. (diff)
downloadmariadb-86fbb58c3ac0865482819c10a3e81f2eea001c36.tar.xz
mariadb-86fbb58c3ac0865482819c10a3e81f2eea001c36.zip
Merging upstream version 1:10.11.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'plugin/type_inet')
-rw-r--r--plugin/type_inet/mysql-test/type_inet/type_inet4_myisam.result2
-rw-r--r--plugin/type_inet/mysql-test/type_inet/type_inet6.result75
-rw-r--r--plugin/type_inet/mysql-test/type_inet/type_inet6.test26
-rw-r--r--plugin/type_inet/mysql-test/type_inet/type_inet6_myisam.result2
4 files changed, 105 insertions, 0 deletions
diff --git a/plugin/type_inet/mysql-test/type_inet/type_inet4_myisam.result b/plugin/type_inet/mysql-test/type_inet/type_inet4_myisam.result
index b6fd55e1..aaf66b34 100644
--- a/plugin/type_inet/mysql-test/type_inet/type_inet4_myisam.result
+++ b/plugin/type_inet/mysql-test/type_inet/type_inet4_myisam.result
@@ -98,6 +98,8 @@ c
EXPLAIN SELECT * FROM t1 WHERE c>CAST('0.0.0.1' AS INET4);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index c c 67 NULL 3 Using where; Using index
+Warnings:
+Note 1105 Cannot use key `c` part[0] for lookup: `test`.`t1`.`c` of type `varchar` > "cast('0.0.0.1' as inet4)" of type `inet4`
SELECT * FROM t1 WHERE c=CAST('0.0.0.1' AS INET4);
c
0.0.0.1
diff --git a/plugin/type_inet/mysql-test/type_inet/type_inet6.result b/plugin/type_inet/mysql-test/type_inet/type_inet6.result
index 1fe4decb..5ac2657f 100644
--- a/plugin/type_inet/mysql-test/type_inet/type_inet6.result
+++ b/plugin/type_inet/mysql-test/type_inet/type_inet6.result
@@ -2284,6 +2284,81 @@ Warnings:
Warning 1292 Incorrect inet6 value: ''
DROP TABLE t1;
#
+# MDEV-32879 Server crash in my_decimal::operator= or unexpected ER_DUP_ENTRY upon comparison with INET6 and similar types
+#
+CREATE TABLE t1 (a CHAR(36) NOT NULL, b INET6 NOT NULL, c DATETIME(6) NOT NULL);
+INSERT INTO t1 VALUES ('','::','2000-01-01'),('','::','1900-01-01');
+SELECT c + (b = a) AS f, GROUP_CONCAT(c) FROM t1 GROUP BY f;
+f GROUP_CONCAT(c)
+NULL 2000-01-01 00:00:00.000000,1900-01-01 00:00:00.000000
+Warnings:
+Warning 1292 Incorrect inet6 value: ''
+Warning 1292 Incorrect inet6 value: ''
+Warning 1292 Incorrect inet6 value: ''
+Warning 1292 Incorrect inet6 value: ''
+Warning 1292 Incorrect inet6 value: ''
+DROP TABLE t1;
+CREATE TABLE t1 (a CHAR(36) NOT NULL, b INET6 NOT NULL, c DATETIME(6) NOT NULL);
+INSERT INTO t1 VALUES ('','::','2000-01-01'),('','::','1900-01-01');
+SELECT c + (b = a) AS f, COUNT(c) FROM t1 GROUP BY f;
+f COUNT(c)
+NULL 2
+Warnings:
+Warning 1292 Incorrect inet6 value: ''
+Warning 1292 Incorrect inet6 value: ''
+Warning 1292 Incorrect inet6 value: ''
+DROP TABLE t1;
+CREATE OR REPLACE TABLE t1 (a CHAR(36) NOT NULL, b INET6 NOT NULL, c DATETIME(6) NOT NULL);
+INSERT INTO t1 VALUES ('','::','2000-01-01'),('','::','1900-01-01');
+SELECT c + (b = a) AS f FROM t1 ORDER BY f;
+f
+NULL
+NULL
+Warnings:
+Warning 1292 Incorrect inet6 value: ''
+Warning 1292 Incorrect inet6 value: ''
+Warning 1292 Incorrect inet6 value: ''
+Warning 1292 Incorrect inet6 value: ''
+DROP TABLE t1;
+CREATE OR REPLACE TABLE t1 (a CHAR(36) NOT NULL, b INET6 NOT NULL);
+INSERT INTO t1 VALUES ('','::'),('','::');
+SELECT 1.00 + (b = a) AS f FROM t1 ORDER BY f;
+f
+NULL
+NULL
+Warnings:
+Warning 1292 Incorrect inet6 value: ''
+Warning 1292 Incorrect inet6 value: ''
+Warning 1292 Incorrect inet6 value: ''
+Warning 1292 Incorrect inet6 value: ''
+SELECT 1.00 + (b BETWEEN a AND '') AS f FROM t1 ORDER BY f;
+f
+NULL
+NULL
+Warnings:
+Warning 1292 Incorrect inet6 value: ''
+Warning 1292 Incorrect inet6 value: ''
+Warning 1292 Incorrect inet6 value: ''
+Warning 1292 Incorrect inet6 value: ''
+Warning 1292 Incorrect inet6 value: ''
+Warning 1292 Incorrect inet6 value: ''
+Warning 1292 Incorrect inet6 value: ''
+Warning 1292 Incorrect inet6 value: ''
+SELECT 1.00 + (b IN (a,'')) AS f FROM t1 ORDER BY f;
+f
+NULL
+NULL
+Warnings:
+Warning 1292 Incorrect inet6 value: ''
+Warning 1292 Incorrect inet6 value: ''
+Warning 1292 Incorrect inet6 value: ''
+Warning 1292 Incorrect inet6 value: ''
+Warning 1292 Incorrect inet6 value: ''
+Warning 1292 Incorrect inet6 value: ''
+Warning 1292 Incorrect inet6 value: ''
+Warning 1292 Incorrect inet6 value: ''
+DROP TABLE t1;
+#
# MDEV-22256 Assertion `length == pack_length()' failed in Field_timestamp_with_dec::sort_string
#
SET sql_mode='';
diff --git a/plugin/type_inet/mysql-test/type_inet/type_inet6.test b/plugin/type_inet/mysql-test/type_inet/type_inet6.test
index 99f75312..0c56ecfe 100644
--- a/plugin/type_inet/mysql-test/type_inet/type_inet6.test
+++ b/plugin/type_inet/mysql-test/type_inet/type_inet6.test
@@ -1676,6 +1676,32 @@ SELECT * FROM t1 WHERE a IN ('','::1');
DROP TABLE t1;
--echo #
+--echo # MDEV-32879 Server crash in my_decimal::operator= or unexpected ER_DUP_ENTRY upon comparison with INET6 and similar types
+--echo #
+
+CREATE TABLE t1 (a CHAR(36) NOT NULL, b INET6 NOT NULL, c DATETIME(6) NOT NULL);
+INSERT INTO t1 VALUES ('','::','2000-01-01'),('','::','1900-01-01');
+SELECT c + (b = a) AS f, GROUP_CONCAT(c) FROM t1 GROUP BY f;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a CHAR(36) NOT NULL, b INET6 NOT NULL, c DATETIME(6) NOT NULL);
+INSERT INTO t1 VALUES ('','::','2000-01-01'),('','::','1900-01-01');
+SELECT c + (b = a) AS f, COUNT(c) FROM t1 GROUP BY f;
+DROP TABLE t1;
+
+CREATE OR REPLACE TABLE t1 (a CHAR(36) NOT NULL, b INET6 NOT NULL, c DATETIME(6) NOT NULL);
+INSERT INTO t1 VALUES ('','::','2000-01-01'),('','::','1900-01-01');
+SELECT c + (b = a) AS f FROM t1 ORDER BY f;
+DROP TABLE t1;
+
+CREATE OR REPLACE TABLE t1 (a CHAR(36) NOT NULL, b INET6 NOT NULL);
+INSERT INTO t1 VALUES ('','::'),('','::');
+SELECT 1.00 + (b = a) AS f FROM t1 ORDER BY f;
+SELECT 1.00 + (b BETWEEN a AND '') AS f FROM t1 ORDER BY f;
+SELECT 1.00 + (b IN (a,'')) AS f FROM t1 ORDER BY f;
+DROP TABLE t1;
+
+--echo #
--echo # MDEV-22256 Assertion `length == pack_length()' failed in Field_timestamp_with_dec::sort_string
--echo #
diff --git a/plugin/type_inet/mysql-test/type_inet/type_inet6_myisam.result b/plugin/type_inet/mysql-test/type_inet/type_inet6_myisam.result
index da67e05a..0f20e16d 100644
--- a/plugin/type_inet/mysql-test/type_inet/type_inet6_myisam.result
+++ b/plugin/type_inet/mysql-test/type_inet/type_inet6_myisam.result
@@ -98,6 +98,8 @@ c
EXPLAIN SELECT * FROM t1 WHERE c>CAST('::1' AS INET6);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index c c 67 NULL 3 Using where; Using index
+Warnings:
+Note 1105 Cannot use key `c` part[0] for lookup: `test`.`t1`.`c` of type `varchar` > "cast('::1' as inet6)" of type `inet6`
SELECT * FROM t1 WHERE c=CAST('::1' AS INET6);
c
0::1