Details
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.
-