Skip to content

Commit

Permalink
MDEV-27099 Subquery using the ALL keyword on INET6 columns produces a…
Browse files Browse the repository at this point in the history
… wrong result

This problem was earlier fixed by MDEV-27101.
Adding INET6 tests only.
  • Loading branch information
abarkov committed Aug 23, 2022
1 parent 3b656ac commit 55c648a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
16 changes: 16 additions & 0 deletions plugin/type_inet/mysql-test/type_inet/type_inet6.result
Expand Up @@ -2213,3 +2213,19 @@ SELECT * FROM companies;
id name
DROP TABLE divisions;
DROP TABLE companies;
#
# MDEV-27099 Subquery using the ALL keyword on INET6 columns produces a wrong result
#
CREATE TABLE t1 (d INET6);
INSERT INTO t1 VALUES ('1::0'), ('12::0');
SELECT * FROM t1 ORDER BY d;
d
1::
12::
SELECT * FROM t1 WHERE d <= ALL (SELECT * FROM t1);
d
1::
SELECT * FROM t1 WHERE d >= ALL (SELECT * FROM t1);
d
12::
DROP TABLE t1;
11 changes: 11 additions & 0 deletions plugin/type_inet/mysql-test/type_inet/type_inet6.test
Expand Up @@ -1630,3 +1630,14 @@ DELETE FROM companies WHERE id IN (SELECT company_id FROM divisions);
SELECT * FROM companies;
DROP TABLE divisions;
DROP TABLE companies;

--echo #
--echo # MDEV-27099 Subquery using the ALL keyword on INET6 columns produces a wrong result
--echo #

CREATE TABLE t1 (d INET6);
INSERT INTO t1 VALUES ('1::0'), ('12::0');
SELECT * FROM t1 ORDER BY d;
SELECT * FROM t1 WHERE d <= ALL (SELECT * FROM t1);
SELECT * FROM t1 WHERE d >= ALL (SELECT * FROM t1);
DROP TABLE t1;

0 comments on commit 55c648a

Please sign in to comment.