[MCOL-1829] Output of 'select * (with order by limit) queries' returns unexpected result Created: 2018-10-23 Updated: 2020-08-25 Resolved: 2019-01-21 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | None |
| Affects Version/s: | 1.1.5, 1.2.1 |
| Fix Version/s: | 1.1.7, 1.2.3 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Muhammad Irfan | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Sprint: | 2018-21, 2019-01 | ||||||||||||
| Description |
|
1. simple table created. 4 rows of data is entered. CREATE TABLE `football_teams` ( insert into football_teams VALUES (1,'Green Bay',53); MariaDB [test]> select * from football_teams;
-----
----- 2. A query that orders the entries by a column and limits the return. This output is as expected. MariaDB [test]> select distinct num from football_teams order by num limit 3;
------
------ 3. subquery result set is not equivalent with result in step-2 MariaDB [test]> select * from (select distinct num from football_teams order by num limit 3) a;
------
------ |
| Comments |
| Comment by patrice [ 2018-11-30 ] |
|
this bug is still present in 1.2.1 |
| Comment by David Thompson (Inactive) [ 2018-12-20 ] |
|
and confirmed still in 1.2.2, the presence of distinct is a necessary condition, removing this query works as expected. |
| Comment by Roman [ 2018-12-26 ] |
|
Please review the change. |
| Comment by Andrew Hutchings (Inactive) [ 2019-01-07 ] |
|
Approved and merged into 1.2, can you please backport to 1.1? |
| Comment by Roman [ 2019-01-15 ] |
|
Please review the change. |
| Comment by Daniel Lee (Inactive) [ 2019-01-21 ] |
|
Build verified: 1.1.7-1 server commit: 1.2.3-1 server commit: Please note that although these is an order-by clause in the sub-query, the final result may or may not be sorted. This is a known behavior. If sorted final result is desired, an order-by clause in the outer most query is required. |