Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
10.2.6
-
None
-
10.2.6-MariaDB-10.2.6+maria~xenial-log on Ubuntu 16.04.2 LTS running Linux 4.4.0-57 x86_64
Description
Consider the output of the following query:
MariaDB [music]> SELECT o.id FROM orders o |
WHERE EXISTS(SELECT 1 FROM payments p WHERE p.orderId = o.id AND p.paymentTypeId = 95); |
+---------+ |
| id |
|
+---------+ |
| 2009186 |
|
| 2017037 |
|
+---------+ |
2 rows in set (0.00 sec) |
Now, if I add an ORDER BY clause, the query still returns two results, but the latter row is repeated (and the former row gone):
MariaDB [music]> SELECT o.id FROM orders o |
WHERE EXISTS(SELECT 1 FROM payments p WHERE p.orderId = o.id AND p.paymentTypeId = 95) |
ORDER BY o.id; |
+---------+ |
| id |
|
+---------+ |
| 2017037 |
|
| 2017037 |
|
+---------+ |
2 rows in set (0.00 sec) |
I have attempted to recreate a minimal test case for the issue, but with not success.
Attachments
Issue Links
- duplicates
-
MDEV-13390 Identity server Db Select Statement order by issue.
- Closed