oracle 19c merge into a view when not match ORA-07445, ORA-03113, ORA-03114
Platform: Windows Server 2019
Product Name: Oracle 19c 19.3
Current Version: 19c 19.20 WinBP
OJVM: 19c 19.20
----------
Background:
On Windows, I cannot install patch 35182029 and OJVM 19.20 at the same time, they seem conflict with each other.
so I tried to repeat the problem MERGE INTO and found the following error
----------
To repeat the problem:
- Create a temp table
- Insert one row
- Do the merge into statement
- Error ora-07445, ORA-03113, ORA-0314
Detail Steps:
CREATE TABLE TestTable
(
ID VARCHAR2(10),
DESC1 VARCHAR2(10),
DESC2 VARCHAR2(10),
PRIMARY KEY (ID)
);
INSERT INTO TestTable(ID, DESC1, DESC2) VALUES ('X1', 'DESC1', 'DESC2');
COMMIT;
-- Test Error E1
MERGE INTO
(SELECT ID, DESC1, 'D2' AS DESC2 FROM TestTable WHERE ID = 'X1') t1
USING (SELECT 'X1' AS ID FROM dual) t2 ON (t1.ID = t2.ID)
WHEN MATCHED THEN
UPDATE SET t1.DESC2 = 'D1';
-- Test Error E2
MERGE INTO
(SELECT ID, DESC1, 'D2' AS DESC2 FROM TestTable WHERE ID = 'X1') t1
USING (SELECT 'X2' AS ID FROM dual) t2 ON (t1.ID = t2.ID)
WHEN MATCHED THEN
UPDATE SET t1.DESC2 = 'D1'
WHEN NOT MATCHED THEN
INSERT (ID, DESC1, DESC2) VALUES ('X2', 'X2D1', 'X2D2')
;
-- Test Error E3
MERGE