Commit 590ce857 authored by Alexander Barkov's avatar Alexander Barkov

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.
parent bdd80e3f
......@@ -3171,3 +3171,19 @@ SELECT * FROM companies;
id name
DROP TABLE divisions;
DROP TABLE companies;
#
# MDEV-27100 Subquery using the ALL keyword on UUID columns produces a wrong result
#
CREATE TABLE t1 (d UUID);
INSERT INTO t1 VALUES ('00000000-0000-0000-0000-111111111111'), ('11111111-0000-0000-0000-000000000000');
SELECT * FROM t1 ORDER BY d;
d
11111111-0000-0000-0000-000000000000
00000000-0000-0000-0000-111111111111
SELECT * FROM t1 WHERE d <= ALL (SELECT * FROM t1);
d
11111111-0000-0000-0000-000000000000
SELECT * FROM t1 WHERE d >= ALL (SELECT * FROM t1);
d
00000000-0000-0000-0000-111111111111
DROP TABLE t1;
......@@ -1670,3 +1670,15 @@ DELETE FROM companies WHERE id IN (SELECT company_id FROM divisions);
SELECT * FROM companies;
DROP TABLE divisions;
DROP TABLE companies;
--echo #
--echo # MDEV-27100 Subquery using the ALL keyword on UUID columns produces a wrong result
--echo #
CREATE TABLE t1 (d UUID);
INSERT INTO t1 VALUES ('00000000-0000-0000-0000-111111111111'), ('11111111-0000-0000-0000-000000000000');
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;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment