Skip to content

Commit 91fc90c

Browse files
committed
Update to previous cset, which added ORDER BY into the wrong clause
1 parent e292ea8 commit 91fc90c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

mysql-test/r/win.result

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1778,17 +1778,17 @@ insert into t1 values (null,'a');
17781778
insert into t1 values (2,'b');
17791779
insert into t1 values (-1,'');
17801780
explain format=json
1781-
select *, row_number() over (order by s1) as X from t1 order by X desc, s2 desc;
1781+
select *, row_number() over (order by s1, s2) as X from t1 order by X desc;
17821782
EXPLAIN
17831783
{
17841784
"query_block": {
17851785
"select_id": 1,
17861786
"filesort": {
1787-
"sort_key": "X, t1.s2",
1787+
"sort_key": "X",
17881788
"window_functions_computation": {
17891789
"sorts": {
17901790
"filesort": {
1791-
"sort_key": "t1.s1"
1791+
"sort_key": "t1.s1, t1.s2"
17921792
}
17931793
},
17941794
"temporary_table": {
@@ -1803,12 +1803,12 @@ EXPLAIN
18031803
}
18041804
}
18051805
}
1806-
select *, row_number() over (order by s1) as X from t1 order by X desc, s2 desc;
1806+
select *, row_number() over (order by s1, s2) as X from t1 order by X desc;
18071807
s1 s2 X
18081808
2 b 6
18091809
1 a 5
18101810
1 NULL 4
18111811
-1 3
1812-
NULL NULL 2
1813-
NULL a 1
1812+
NULL a 2
1813+
NULL NULL 1
18141814
drop table t1;

mysql-test/t/win.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,7 +1092,7 @@ insert into t1 values (2,'b');
10921092
insert into t1 values (-1,'');
10931093

10941094
explain format=json
1095-
select *, row_number() over (order by s1) as X from t1 order by X desc, s2 desc;
1096-
select *, row_number() over (order by s1) as X from t1 order by X desc, s2 desc;
1095+
select *, row_number() over (order by s1, s2) as X from t1 order by X desc;
1096+
select *, row_number() over (order by s1, s2) as X from t1 order by X desc;
10971097
drop table t1;
10981098

0 commit comments

Comments
 (0)