Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
10.2(EOL), 10.3(EOL), 10.4(EOL)
-
None
Description
create table t1(i int); |
insert into t1 values (1),(2),(3),(4),(5); |
|
select sum(i) over (order by sum(i)) from t1 group by i; |
select sum(i) over (order by sum(i)+1) from t1 group by i; |
MariaDB [test]> select sum(i) over (order by sum(i)) from t1 group by i;
|
+-------------------------------+
|
| sum(i) over (order by sum(i)) |
|
+-------------------------------+
|
| 1 |
|
| 3 |
|
| 6 |
|
| 10 |
|
| 15 |
|
+-------------------------------+
|
5 rows in set (0.002 sec)
|
|
MariaDB [test]> select sum(i) over (order by sum(i)+1) from t1 group by i;
|
+---------------------------------+
|
| sum(i) over (order by sum(i)+1) |
|
+---------------------------------+
|
| 15 |
|
| 15 |
|
| 15 |
|
| 15 |
|
| 15 |
|
+---------------------------------+
|
5 rows in set (0.001 sec)
|
|
Mysql 8.0.15:
mysql> select sum(i) over (order by sum(i)) from t1 group by i;
|
+-------------------------------+
|
| sum(i) over (order by sum(i)) |
|
+-------------------------------+
|
| 1 |
|
| 3 |
|
| 6 |
|
| 10 |
|
| 15 |
|
+-------------------------------+
|
5 rows in set (0.00 sec)
|
|
mysql> select sum(i) over (order by sum(i)+1) from t1 group by i;
|
+---------------------------------+
|
| sum(i) over (order by sum(i)+1) |
|
+---------------------------------+
|
| 1 |
|
| 3 |
|
| 6 |
|
| 10 |
|
| 15 |
|
+---------------------------------+
|
5 rows in set (0.00 sec)
|
Attachments
Issue Links
- duplicates
-
MDEV-14791 Crash with order by expression containing window functions
- Closed