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

Merge returns internal error when the table has a constraint

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.0
    • 2.3
    • sql-cmp
    • None
    • Reproduced this on a workstation; I suspect it will happen in any environment.

    Description

      Consider the following script:

      create table mytable1 (a int not null not droppable primary key, b int, c int);
      insert into mytable1 values (1,1,1),(2,2,2),(3,3,3);
      merge into mytable1 on a=1 when matched then update set c=100;

      create table mytable2 (a int not null not droppable primary key, b int, c int, check (b > 0));
      insert into mytable2 values (1,1,1),(2,2,2),(3,3,3);
      merge into mytable2 on a=1 when matched then update set c=100;

      When this script is executed, the first MERGE statement executes normally but the second fails as follows:

      >>merge into mytable2 on a=1 when matched then update set c=100;

          • ERROR[7000] An internal error occurred in the code generator in file ../generator/GenRelUpdate.cpp at line 1721: Should not reach here. This update should have been transformed to delete/insert.
          • ERROR[2235] Compiler Internal Error: An unknown error, originated from file ../generator/Generator.cpp at line 3065.
          • ERROR[8822] The statement was not prepared.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: