Roberta Marton created TRAFODION-2153:
-----------------------------------------
Summary: Views with UNION do not generate usages causing column
privs to fail
Key: TRAFODION-2153
URL: https://issues.apache.org/jira/browse/TRAFODION-2153
Project: Apache Trafodion
Issue Type: Bug
Components: sql-cmp
Reporter: Roberta Marton
Column level privileges cannot be granted to views that contain a UNION in the
view text. The binder is not creating the view col, referenced col
relationship. Column privileges need to know the columns of the views
referenced objects to look at these referenced privileges.
To reproduce:
create table tmp_LP_1360493
(sbin0_4 integer not null
, varchar0_500 varchar(11) default 'GDAAIAAA' not null heading 'varchar0_500
no nulls'
, sdec16_uniq numeric(18,0) signed not null
);
create view view_LP_1360493
as select * from tmp_LP_1360493 where sdec16_uniq > 3000
union
select * from tmp_LP_1360493 where sdec16_uniq < 2500;
view: view_LP_1360493 does not store the view-col <=> refd-col relationship in
the text table.
select substring (text,1,20) from "_MD_".text where text_type = 8 and text_uid
= (select object_uid from "_MD_".objects where object_name = 'VIEW_LP_1360493');
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)