[
https://issues.apache.org/jira/browse/TRAFODION-2983?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Wayne Birdsall updated TRAFODION-2983:
--------------------------------------------
Description:
The following script reproduces the problem:
{quote}?section setup
drop table if exists t1;
drop table if exists t2;
drop table if exists t3;
create table t1
(
id1 varchar(50 bytes) no default not null not droppable not serialized
, yn varchar(1 byte) default null not serialized
)
attributes aligned format
;
create unique index t1pk ON t1
(
id1 asc
)
attributes aligned format
;
create table t2
(
id1 varchar(50 bytes) no default not null not droppable not serialized
, id3 varchar(50 bytes) no default not null not droppable not serialized
, id2 varchar(4 bytes) default null not serialized
, c1 varchar(50 bytes) default null not serialized
)
attributes aligned format
;
create unique index t2pk ON t2
(
id1 asc
, id3 asc
)
attributes aligned format
;
create table t3
(
id2 varchar(50 bytes) no default not null not droppable not serialized
, nm varchar(100 bytes) no default not null not droppable not serialized
)
attributes aligned format
;
?section s1
-- reproduces the error
prepare s1 from
select t1.id1,
t2.c1,
decode(t1.yn, 'Y', (select t3.nm
from t3
where t3.id2 = t2.id2),
'N') yn
from t1
left outer join t2
on t2.id1 = t1.id1
where t1.id1 = 'this is a dummy ID string';
{quote}
When run, the PREPARE fails with an internal error in the generator, 7000. (On
debug builds, it fails with a core.)
was:
The following script reproduces the problem:
{quote}{{?section setup}}{{drop table if exists t1;}}
{{drop table if exists t2;}}
{{drop table if exists t3;}}{{create table t1}}
{{ ( }}
{{ id1 varchar(50 bytes) no default not null not droppable not serialized}}
{{ , yn varchar(1 byte) default null not serialized}}
{{ )}}
{{ attributes aligned format }}
{{;}}{{create unique index t1pk ON t1}}
{{ ( }}
{{ id1 asc}}
{{ )}}
{{ attributes aligned format }}
{{;}}{{create table t2}}
{{ ( }}
{{ id1 varchar(50 bytes) no default not null not droppable not serialized}}
{{ , id3 varchar(50 bytes) no default not null not droppable not serialized}}
{{ , id2 varchar(4 bytes) default null not serialized}}
{{ , c1 varchar(50 bytes) default null not serialized}}
{{ )}}
{{ attributes aligned format }}
{{;}}{{create unique index t2pk ON t2}}
{{ ( }}
{{ id1 asc}}
{{ , id3 asc}}
{{ )}}
{{ attributes aligned format }}
{{;}}
{{create table t3}}
{{ ( }}
{{ id2 varchar(50 bytes) no default not null not droppable not serialized}}
{{ , nm varchar(100 bytes) no default not null not droppable not serialized}}
{{ )}}
{{ attributes aligned format }}
{{;}}{{ }}{quote}
{quote}{{?section s1}}{quote}
{quote}{{-- reproduces the error}}{quote}
{quote}{{prepare s1 from}}
{{select t1.id1, }}
{{ t2.c1, }}
{{ decode(t1.yn, 'Y', (select t3.nm}}
{{ from t3}}
{{ where t3.id2 = t2.id2),}}
{{ 'N') yn}}
{{ from t1}}
{{ left outer join t2 }}
{{ on t2.id1 = t1.id1}}
{{ where t1.id1 = 'this is a dummy ID string';}}{quote}
When run, the PREPARE fails with an internal error in the generator, 7000. (On
debug builds, it fails with a core.)
> Query fails with an internal error in the generator
> ---------------------------------------------------
>
> Key: TRAFODION-2983
> URL: https://issues.apache.org/jira/browse/TRAFODION-2983
> Project: Apache Trafodion
> Issue Type: Bug
> Components: sql-cmp
> Affects Versions: 2.3
> Reporter: David Wayne Birdsall
> Assignee: David Wayne Birdsall
> Priority: Major
>
> The following script reproduces the problem:
> {quote}?section setup
> drop table if exists t1;
> drop table if exists t2;
> drop table if exists t3;
> create table t1
> (
> id1 varchar(50 bytes) no default not null not droppable not serialized
> , yn varchar(1 byte) default null not serialized
> )
> attributes aligned format
> ;
> create unique index t1pk ON t1
> (
> id1 asc
> )
> attributes aligned format
> ;
> create table t2
> (
> id1 varchar(50 bytes) no default not null not droppable not serialized
> , id3 varchar(50 bytes) no default not null not droppable not serialized
> , id2 varchar(4 bytes) default null not serialized
> , c1 varchar(50 bytes) default null not serialized
> )
> attributes aligned format
> ;
> create unique index t2pk ON t2
> (
> id1 asc
> , id3 asc
> )
> attributes aligned format
> ;
>
> create table t3
> (
> id2 varchar(50 bytes) no default not null not droppable not serialized
> , nm varchar(100 bytes) no default not null not droppable not serialized
> )
> attributes aligned format
> ;
> ?section s1
> -- reproduces the error
> prepare s1 from
> select t1.id1,
> t2.c1,
> decode(t1.yn, 'Y', (select t3.nm
> from t3
> where t3.id2 = t2.id2),
> 'N') yn
> from t1
> left outer join t2
> on t2.id1 = t1.id1
> where t1.id1 = 'this is a dummy ID string';
> {quote}
> When run, the PREPARE fails with an internal error in the generator, 7000.
> (On debug builds, it fails with a core.)
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)