Skip to content

Commit 55c648a

Browse files
committed
MDEV-27099 Subquery using the ALL keyword on INET6 columns produces a wrong result
This problem was earlier fixed by MDEV-27101. Adding INET6 tests only.
1 parent 3b656ac commit 55c648a

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

plugin/type_inet/mysql-test/type_inet/type_inet6.result

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2213,3 +2213,19 @@ SELECT * FROM companies;
22132213
id name
22142214
DROP TABLE divisions;
22152215
DROP TABLE companies;
2216+
#
2217+
# MDEV-27099 Subquery using the ALL keyword on INET6 columns produces a wrong result
2218+
#
2219+
CREATE TABLE t1 (d INET6);
2220+
INSERT INTO t1 VALUES ('1::0'), ('12::0');
2221+
SELECT * FROM t1 ORDER BY d;
2222+
d
2223+
1::
2224+
12::
2225+
SELECT * FROM t1 WHERE d <= ALL (SELECT * FROM t1);
2226+
d
2227+
1::
2228+
SELECT * FROM t1 WHERE d >= ALL (SELECT * FROM t1);
2229+
d
2230+
12::
2231+
DROP TABLE t1;

plugin/type_inet/mysql-test/type_inet/type_inet6.test

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1630,3 +1630,14 @@ DELETE FROM companies WHERE id IN (SELECT company_id FROM divisions);
16301630
SELECT * FROM companies;
16311631
DROP TABLE divisions;
16321632
DROP TABLE companies;
1633+
1634+
--echo #
1635+
--echo # MDEV-27099 Subquery using the ALL keyword on INET6 columns produces a wrong result
1636+
--echo #
1637+
1638+
CREATE TABLE t1 (d INET6);
1639+
INSERT INTO t1 VALUES ('1::0'), ('12::0');
1640+
SELECT * FROM t1 ORDER BY d;
1641+
SELECT * FROM t1 WHERE d <= ALL (SELECT * FROM t1);
1642+
SELECT * FROM t1 WHERE d >= ALL (SELECT * FROM t1);
1643+
DROP TABLE t1;

0 commit comments

Comments
 (0)