Skip to content
Permalink
Browse files

Update to previous cset, which added ORDER BY into the wrong clause

  • Loading branch information
spetrunia committed Apr 9, 2016
1 parent e292ea8 commit 91fc90c37294ca8bb7e941d162838961818599c2
Showing with 8 additions and 8 deletions.
  1. +6 −6 mysql-test/r/win.result
  2. +2 −2 mysql-test/t/win.test
@@ -1778,17 +1778,17 @@ insert into t1 values (null,'a');
insert into t1 values (2,'b');
insert into t1 values (-1,'');
explain format=json
select *, row_number() over (order by s1) as X from t1 order by X desc, s2 desc;
select *, row_number() over (order by s1, s2) as X from t1 order by X desc;
EXPLAIN
{
"query_block": {
"select_id": 1,
"filesort": {
"sort_key": "X, t1.s2",
"sort_key": "X",
"window_functions_computation": {
"sorts": {
"filesort": {
"sort_key": "t1.s1"
"sort_key": "t1.s1, t1.s2"
}
},
"temporary_table": {
@@ -1803,12 +1803,12 @@ EXPLAIN
}
}
}
select *, row_number() over (order by s1) as X from t1 order by X desc, s2 desc;
select *, row_number() over (order by s1, s2) as X from t1 order by X desc;
s1 s2 X
2 b 6
1 a 5
1 NULL 4
-1 3
NULL NULL 2
NULL a 1
NULL a 2
NULL NULL 1
drop table t1;
@@ -1092,7 +1092,7 @@ insert into t1 values (2,'b');
insert into t1 values (-1,'');

explain format=json
select *, row_number() over (order by s1) as X from t1 order by X desc, s2 desc;
select *, row_number() over (order by s1) as X from t1 order by X desc, s2 desc;
select *, row_number() over (order by s1, s2) as X from t1 order by X desc;
select *, row_number() over (order by s1, s2) as X from t1 order by X desc;
drop table t1;

0 comments on commit 91fc90c

Please sign in to comment.
You can’t perform that action at this time.