Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-11583

Can't read from view with window function in its definition

    XMLWordPrintable

    Details

      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.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            OllieJones Oliver Jones
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.