summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-08-30 13:04:17 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-08-30 13:04:17 +0300
commitc8cd162a0a5daa17a8b6ca57f2dce44388b1b333 (patch)
tree80055c80e0d5ba87b0613b6c52ce46b261b67054 /plugin
parent2bddc5d045b40e64fd2e08cf8e3666370c69ff2b (diff)
parentb86be02ecfbaab78e340bf4b59646816ea33a51f (diff)
downloadmariadb-git-c8cd162a0a5daa17a8b6ca57f2dce44388b1b333.tar.gz
Merge 10.7 into 10.8
Diffstat (limited to 'plugin')
-rw-r--r--plugin/type_uuid/mysql-test/type_uuid/type_uuid.result16
-rw-r--r--plugin/type_uuid/mysql-test/type_uuid/type_uuid.test12
2 files changed, 28 insertions, 0 deletions
diff --git a/plugin/type_uuid/mysql-test/type_uuid/type_uuid.result b/plugin/type_uuid/mysql-test/type_uuid/type_uuid.result
index 2a96b2df592..d388cab45d7 100644
--- a/plugin/type_uuid/mysql-test/type_uuid/type_uuid.result
+++ b/plugin/type_uuid/mysql-test/type_uuid/type_uuid.result
@@ -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;
diff --git a/plugin/type_uuid/mysql-test/type_uuid/type_uuid.test b/plugin/type_uuid/mysql-test/type_uuid/type_uuid.test
index 91f8f82125b..d4e34c5a74b 100644
--- a/plugin/type_uuid/mysql-test/type_uuid/type_uuid.test
+++ b/plugin/type_uuid/mysql-test/type_uuid/type_uuid.test
@@ -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;