Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.2.5
-
None
-
10.2.7-1
Description
The following window function expression crashes the server. The original goal is to have it run in a view but the select alone fails. This is related to MDEV-12840 as that bug was my attempt to rewrite the query in a more sane fashion but the following is technically valid and it may be broader scope.
create table t1(dt datetime);
|
insert into t1 values ('2017-05-17'), ('2017-05-18');
|
|
select dt,
|
-> case when (max(dt) over (order by dt rows between 1 following and 1 following) is null)
|
-> then '9999-12-31 12:00:00'
|
-> else max(dt) over (order by dt rows between 1 following and 1 following)
|
-> end x
|
-> from t1;
|
ERROR 2006 (HY000): MySQL server has gone away
|
No connection. Trying to reconnect...
|
Connection id: 8
|
Current database: genesis
|
|
ERROR 2013 (HY000): Lost connection to MySQL server during query
|
Attachments
Issue Links
- relates to
-
MDEV-12840 view with ifnull around window function error
- Closed
-
MDEV-13552 Bug: Server Shutsdown when using LEAD Window Function within a CASE Function
- Closed
-
MDEV-13683 crash in Item_window_func::update_used_tables
- Closed