David Wayne Birdsall created TRAFODION-2630:
-----------------------------------------------
Summary: Merge returns internal error when the table has a
constraint
Key: TRAFODION-2630
URL: https://issues.apache.org/jira/browse/TRAFODION-2630
Project: Apache Trafodion
Issue Type: Bug
Components: sql-cmp
Affects Versions: 2.2-incubating
Environment: Reproduced this on a workstation; I suspect it will
happen in any environment.
Reporter: David Wayne Birdsall
Assignee: David Wayne Birdsall
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.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)