Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.7(EOL)
-
None
Description
The problem reported in MDEV-27098 for TIME is repeatable with the UUID data type.
DROP TABLE IF EXISTS t1; |
CREATE TABLE t1 (d UUID); |
INSERT INTO t1 VALUES ('00000000-0000-0000-0000-111111111111'), ('11111111-0000-0000-0000-000000000000'); |
SELECT * FROM t1 WHERE d >= ALL (SELECT * FROM t1); |
+--------------------------------------+
|
| d |
|
+--------------------------------------+
|
| 00000000-0000-0000-0000-111111111111 |
|
| 11111111-0000-0000-0000-000000000000 |
|
+--------------------------------------+
|
The expected result should contain only one with with the maximum value '00000000-0000-0000-0000-111111111111'.
SELECT * FROM t1 WHERE d <= ALL (SELECT * FROM t1); |
+--------------------------------------+
|
| d |
|
+--------------------------------------+
|
| 00000000-0000-0000-0000-111111111111 |
|
| 11111111-0000-0000-0000-000000000000 |
|
+--------------------------------------+
|
The expected result should contain only one with with the maximum value '11111111-0000-0000-0000-000000000000'.
Attachments
Issue Links
- relates to
-
MDEV-27101 Subquery using the ALL keyword on TIMESTAMP columns produces a wrong result
-
- Closed
-
-
MDEV-27098 Subquery using the ALL keyword on TIME columns produces a wrong result
-
- Closed
-
-
MDEV-27099 Subquery using the ALL keyword on INET6 columns produces a wrong result
-
- Closed
-
I am noticing a possibly related issue with `OR` on the selects where a subquery is involved. Please let me know if this merits a separate issue.
Setup for the test:
);
PersonID uuid,
);
There are now 2 people and 4 orders. The following returns two of the orders, as expected:
Persons.ID = Orders.PersonID
)
);
However, adding an `OR` to the where clause returns 0 results. There should be no changes in output.
Persons.ID = Orders.PersonID
)