Uploaded image for project: 'Apache Trafodion (Retired)'
  1. Apache Trafodion (Retired)
  2. TRAFODION-2983

Query fails with an internal error in the generator

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3
    • 2.3
    • sql-cmp
    • None

    Description

      The following script reproduces the problem:

      ?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';

      When run, the PREPARE fails with an internal error in the generator, 7000. (On debug builds, it fails with a core.)

       

       

      Attachments

        Issue Links

          Activity

            People

              dbirdsall Dave Birdsall
              dbirdsall Dave Birdsall
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: