Bugs item #2654300, was opened at 2009-03-02 11:41
Message generated for change (Comment added) made by nielsnes
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2654300&group_id=56967

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: SQL/Core
Group: SQL "stable"
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Roberto Cornacchia (cornuz)
Assigned to: Niels Nes (nielsnes)
Summary: problem with views reusing aliases ?

Initial Comment:
[ on Feb2009 branch ]

create table x (n int, s varchar(10));
insert into x values (1, 'one');
insert into x values (2, 'two');
insert into x values (3, 'three');

-- swap the two attributes
create view x1 as
select s as a1, n as a2 from x;

-- swap them again
create view x2 as
select a2 as a1, a1 as a2 from x1;

-- select on the original 's' attribute fails
select * from x2 where a2='two';

This is the output:

$ mclient -lsql -dtest02 -G < bug2.sql
[ 1     ]
[ 1     ]
[ 1     ]
MAPI  = mone...@localhost:50000
QUERY = select * from x2 where a2='two';
ERROR = !TypeException:user.s0_1[4]:'algebra.uselect' undefined in: _9:any := 
algebra.uselect(_2:bat[:oid,:str], _8:int)
        !TypeException:user.s0_1[6]:'algebra.kdifference' undefined in: _12:any 
:= algebra.kdifference(_9:any, _10:bat[:oid,:str])
        !TypeException:user.s0_1[7]:'algebra.uselect' undefined in: _13:any := 
algebra.uselect(_10:bat[:oid,:str], _8:int)
        !TypeException:user.s0_1[8]:'algebra.kunion' undefined in: _14:any := 
algebra.kunion(_12:any, _13:any)
        !TypeException:user.s0_1[10]:'algebra.uselect' undefined in: _17:any := 
algebra.uselect(_15:bat[:oid,:str], _8:int)
        !TypeException:user.s0_1[11]:'algebra.kunion' undefined in: _18:any := 
algebra.kunion(_14:any, _17:any)
        !TypeException:user.s0_1[14]:'algebra.kdifference' undefined in: 
_21:any := algebra.kdifference(_18:any, _20:bat[:oid,:oid])
        !TypeException:user.s0_1[16]:'algebra.markT' undefined in: _24:any := 
algebra.markT(_21:any, _22:oid)
        !TypeException:user.s0_1[17]:'bat.reverse' undefined in: _25:any := 
bat.reverse(_24:any)
        !TypeException:user.s0_1[24]:'algebra.join' undefined in: _33:any := 
algebra.join(_25:any, _32:bat[:oid,:int])
        !TypeException:user.s0_1[28]:'algebra.join' undefined in: _37:any := 
algebra.join(_25:any, _36:bat[:oid,:str])
        !SQLException:int:conversion of string 'two' failed


----------------------------------------------------------------------

>Comment By: Niels Nes (nielsnes)
Date: 2009-03-03 11:55

Message:
test added to BugTracker-2009 / lookup_column_name_bug_1.SF-2654300.sql
Fixed by correctly setting 'processed' and only returning columns from
processed projections (ie not of the current in process project)

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2654300&group_id=56967

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to