[MDEV-10184] Query with ROW_NUMBER() hangs indefinitely if ORDER or PARTITION not specified Created: 2016-06-06  Updated: 2016-06-09  Resolved: 2016-06-09

Status: Closed
Project: MariaDB Server
Component/s: Optimizer - Window functions
Affects Version/s: 10.2.0
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: nick ivanov Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: window-functions
Environment:

RHEL 6.6 64 bit


Issue Links:
Duplicate
is duplicated by MDEV-9935 Window functions: assertion failure w... Closed
is duplicated by MDEV-9958 Server hangs if OVER() is empty Closed

 Description   

10.2.0-MariaDB

The query

select blah, row_number()  over() from (select 'foo' blah) t;

hangs indefinitely. The process list shows:

+----+------+-----------+-------+---------+------+-------+------------------+----------+
| Id | User | Host      | db    | Command | Time | State | Info             | Progress |
+----+------+-----------+-------+---------+------+-------+------------------+----------+
| 17 | root | localhost | onedb | Sleep   | 958  |       |                  | 0.000    |
| 22 | root | localhost |       | Query   | 0    | init  | show processlist | 0.000    |
+----+------+-----------+-------+---------+------+-------+------------------+----------+

If ORDER BY or PARTITION BY (or both) is specified in OVER(), the query executes successfully.



 Comments   
Comment by Elena Stepanova [ 2016-06-09 ]

Thanks. We have this one already, MDEV-9958 (which is most likely the same as MDEV-9935).

Generated at Thu Feb 08 07:40:18 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.