Skip to content

Commit 590ce85

Browse files
committed
MDEV-27100 Subquery using the ALL keyword on UUID columns produces a wrong result
This problem was earlier fixed by MDEV-27101. Now adding UUID tests only.
1 parent bdd80e3 commit 590ce85

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

plugin/type_uuid/mysql-test/type_uuid/type_uuid.result

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3171,3 +3171,19 @@ SELECT * FROM companies;
31713171
id name
31723172
DROP TABLE divisions;
31733173
DROP TABLE companies;
3174+
#
3175+
# MDEV-27100 Subquery using the ALL keyword on UUID columns produces a wrong result
3176+
#
3177+
CREATE TABLE t1 (d UUID);
3178+
INSERT INTO t1 VALUES ('00000000-0000-0000-0000-111111111111'), ('11111111-0000-0000-0000-000000000000');
3179+
SELECT * FROM t1 ORDER BY d;
3180+
d
3181+
11111111-0000-0000-0000-000000000000
3182+
00000000-0000-0000-0000-111111111111
3183+
SELECT * FROM t1 WHERE d <= ALL (SELECT * FROM t1);
3184+
d
3185+
11111111-0000-0000-0000-000000000000
3186+
SELECT * FROM t1 WHERE d >= ALL (SELECT * FROM t1);
3187+
d
3188+
00000000-0000-0000-0000-111111111111
3189+
DROP TABLE t1;

plugin/type_uuid/mysql-test/type_uuid/type_uuid.test

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1670,3 +1670,15 @@ DELETE FROM companies WHERE id IN (SELECT company_id FROM divisions);
16701670
SELECT * FROM companies;
16711671
DROP TABLE divisions;
16721672
DROP TABLE companies;
1673+
1674+
1675+
--echo #
1676+
--echo # MDEV-27100 Subquery using the ALL keyword on UUID columns produces a wrong result
1677+
--echo #
1678+
1679+
CREATE TABLE t1 (d UUID);
1680+
INSERT INTO t1 VALUES ('00000000-0000-0000-0000-111111111111'), ('11111111-0000-0000-0000-000000000000');
1681+
SELECT * FROM t1 ORDER BY d;
1682+
SELECT * FROM t1 WHERE d <= ALL (SELECT * FROM t1);
1683+
SELECT * FROM t1 WHERE d >= ALL (SELECT * FROM t1);
1684+
DROP TABLE t1;

0 commit comments

Comments
 (0)