[MDEV-2718] LP:793589 - Wrong result with double ORDER BY Created: 2011-06-06 Updated: 2015-02-02 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Philip Stoev (Inactive) | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
Reproducible on maria-5.2, maria-5.3. If a query containing a double ORDER BY is used in a VIEW, selecting from that view returns only some of the rows of the original query. test case: CREATE TABLE t1 ( f1 int NOT NULL , f10 int, f11 varchar(32), PRIMARY KEY (f1)) ; CREATE TABLE t2 ( f11 int) ; CREATE OR REPLACE VIEW v1 AS should return 5 rows, returns only 1 |
| Comments |
| Comment by Philip Stoev (Inactive) [ 2011-07-13 ] | ||||||||||||||||||||
|
Re: Wrong result with double ORDER BY CREATE TABLE t1 ( b int) ; CREATE TABLE t2 ( a int, b int, PRIMARY KEY (a)) ; SELECT t2.b AS field1 FROM t1, t2 WHERE t1.b = t2.a GROUP BY field1 ORDER BY t1.b, field1; explain:
| ||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2011-09-08 ] | ||||||||||||||||||||
|
Re: Wrong result with double ORDER BY The smaller test suite is reproduceable on 5.2 and return 1 instead of two rows 1 and 7. | ||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2011-09-09 ] | ||||||||||||||||||||
|
Re: Wrong result with double ORDER BY | ||||||||||||||||||||
| Comment by Philip Stoev (Inactive) [ 2011-09-09 ] | ||||||||||||||||||||
|
Re: Wrong result with double ORDER BY | ||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2011-12-28 ] | ||||||||||||||||||||
|
Re: Wrong result with double ORDER BY explain extended | ||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2011-12-28 ] | ||||||||||||||||||||
|
Re: Wrong result with double ORDER BY | ||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2011-12-28 ] | ||||||||||||||||||||
|
Re: Wrong result with double ORDER BY For first table | ||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2011-12-28 ] | ||||||||||||||||||||
|
Re: Wrong result with double ORDER BY | ||||||||||||||||||||
| Comment by Rasmus Johansson (Inactive) [ 2012-01-06 ] | ||||||||||||||||||||
|
Launchpad bug id: 793589 |