Affects Version/s: 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1
Issue & fix info:High Value Fix
Bug behavior facts:Wrong query result
Simple repro as follows:
create table t1 (i int, j int);
insert into t1 values (1, 1), (1, -1), (2, 2), (3, -3), (4, 4);
create view v1 as select j, i from t1;
create view v2 (x,y,z) as select j, i, i+j from t1;
– OK: Returns column names specified in AS clause.
select * from t1 as x(a,b);
– OK: Returns column names for the views
select * from v1;
select * from v2;
– WRONG: Ignores column names specified in AS clause for the views.
select * from v1 x(a,b);
select * from v2 as x(a,b,c);
I observed this as far back as 10.0.2.1, so this is not a regression.