[MDEV-3536] LP:711852 - Incorrect "Sort aborted" when GROUP/ORDER expression contains subquery Created: 2011-02-02 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: | Minor |
| Reporter: | Timour Katchaounov (Inactive) | Assignee: | Timour Katchaounov (Inactive) |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
The following test case produces an incorrect "Sort aborted" warnig CREATE TABLE t1 (a int); CREATE TABLE t2 (b int, c int); --error ER_SUBQUERY_NO_1_ROW SELECT a FROM t1 GROUP BY a HAVING (SELECT b FROM t2 WHERE b > 1) > 3; Analysis:
JOIN::exec -> create_sort_index -> filesort -> find_all_keys -> The send_data call detects that there are >1 rows, and issues an error.
|
| Comments |
| Comment by Timour Katchaounov (Inactive) [ 2011-02-02 ] |
|
Re: Incorrect "Sort aborted" when GROUP/ORDER expression contains subquery create table t1( a int); select * from t1 where a > (select a+20 from t2 where t2.a +100 > t1.a +10) order by a+1; ERROR 1242 (21000): Subquery returns more than 1 row |
| Comment by Timour Katchaounov (Inactive) [ 2011-02-03 ] |
|
Re: Incorrect "Sort aborted" when GROUP/ORDER expression contains subquery |
| Comment by Rasmus Johansson (Inactive) [ 2011-02-03 ] |
|
Launchpad bug id: 711852 |