[MDEV-11583] Can't read from view with window function in its definition Created: 2016-12-15  Updated: 2016-12-16  Resolved: 2016-12-16

Status: Closed
Project: MariaDB Server
Component/s: Optimizer - Window functions, Views
Affects Version/s: 10.2.2
Fix Version/s: 10.2.3

Type: Bug Priority: Minor
Reporter: Oliver Jones Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Environment:

Windows



 Description   

In the MariaDB 10.2 beta, creating a view containing a simple window function seems to work, but attempting to use the view fails with

SQL Error (1356): View 'test.rowseq' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

Here's a simple example

create or replace view rowseq as
select ROW_NUMBER() OVER (ORDER BY seq) ROWNUM, seq
from (select 1 as seq union all select 10 union all select 100 union all select 1000 )a;

select * from rowseq;

boom.



 Comments   
Comment by Elena Stepanova [ 2016-12-16 ]

Thanks for the report.
The problem was fixed by a patch for MDEV-10868.

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