]
Steven Hawkins resolved TEIID-3699.
-----------------------------------
Fix Version/s: 8.11.4
Resolution: Done
Updated the logic so that temp tables from a higher scope are visible to execute
immediate.
execute immediate only checks immediate parent scope
----------------------------------------------------
Key: TEIID-3699
URL:
https://issues.jboss.org/browse/TEIID-3699
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 8.7
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 8.12, 8.11.4
A procedure such as:
{code}
begin
create local temporary table t1 (e1 string);
loop on (select 1 as a union all select 2) as c
begin
execute immediate 'select c.a' as e1 string into t1;
end
select * from t1;
end
{code}
should return two rows, but instead returns nothing because the execute immediate
statement doesn't see the surrounding t1 temp table.