Details
Description
The following test case demonstrates the problem:
drop database test; |
create database test; |
create table test.t1 (a int); |
insert into test.t1 values (3),(7),(1); |
create view test.v2 as select * from (select * from test.t1) as t; |
select test.v2.a from test.v2; |
MariaDB [(none)]> select test.v2.a from test.v2;
|
ERROR 1356 (HY000): View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
Attachments
Issue Links
- blocks
-
MDEV-22781 CREATE VIEW containing WITH clause Signal 11
-
- Closed
-
Sanja:
Most probably the bug exists starting from:
commit 7166069537a4e18d4c0848655fcbc0c8ee568fd4
Author: Oleksandr Byelkin <sanja@mariadb.com>
Date: Thu Feb 25 14:55:04 2016 +0100
MDEV-3944: Allow derived tables in VIEWS
I made a checkout for this commit. Yet the tree after this commit was not in a good shape as I got:
MariaDB [(none)]> create view test.v2 as select * from (select * from test.t1) as t;
ERROR 1142 (42000): ANY command denied to user ''@'' for table '*'
I marked this bug as "Critical" because
MDEV-22781is marked as 'Critical'.MDEV-22781is crashing, but I checked it against my fix for MDEV-22886 and there I had the same error message as forMDEV-24314.