Document Type | Troubleshooting
Category | App Development
Applicable Product Versions | 6FS01, 6FS02, 6FS03, 6FS04, 6FS05, 6FS06, 6FS07
Document Number | TDETS012
Issue
An Internal Error with condition 'update_col->node_type == EXPN_PARSE_COLUMN' occurs in the slog and tbsvr.out files.
This mainly occurs during update operations, and when the target of the set clause in the update statement is a function-type argument rather than a column, an Internal Error occurs.
--Example 1
SQL > create table t3(c1 date);
SQL > update t3 set to_date(c1,'YYYY-MM-DD') = to_date('2024-05-31', 'YYYY-MM-DD');ex 2)
--Example 2
SQL > create table t1(c1 varchar(200));
SQL > update t1 set trim(c1) = to_char(sysdate, 'yyyy');--Slog [01-03T16:36:02.944561] [CSC-404] [I] RECV ERROR. errno=104 [01-03T16:37:48.667926] [COM-119] [I] Internal Error with condition 'update_col->node_type == EXPN_PARSE_COLUMN' (dml_update.c:656) (pid=31897, sessid=119, tid=119, os_thr_id=32246) [01-03T16:37:53.421352] [FRM-119] [I] THROW. ec=ERROR_SESS_KILLED(-12001) [ Session has been closed. ] (csr_id:1951) [tbsvr_tracedump.c:294:tb_thr_assert_cmd] [01-03T16:38:10.846902] [CSC-181] [I] RECV ERROR. errno=104
Cause
This error occurs when the target of the set clause during update dml execution is not a column.
Case 1. Table is defined as varchar, but the set clause target uses the trim function
SQL> desc t3; COLUMN_NAME TYPE CONSTRAINT ---------------------------------------------------------------------------- C1 VARCHAR(20) SQL> update t3 set trim(c1) = 'a'; --In this case, the update query's set clause target is not the column c1 itself, but the function trim, so the error occurs
Case 2. Table is defined as date, but the set clause target uses to_ functions
SQL> desc t1;
COLUMN_NAME TYPE CONSTRAINT
----------------------------------------------------------------------------
C1 DATE
SQL > update t1 set to_date(c1,'YYYY-MM-DD') = to_date('2024-05-31', 'YYYY-MM-DD');
--In this case, the update query's set clause target is not the column c1 itself, but the function to_date, so the error occursNote
The above two examples are set to extremes to reproduce the error situation.
Solutions
Apply the patch to resolve the issue. (Applied patch: 141401)
CautionApply the patch through technical support provided by Tmax Tibero.
For a more fundamental solution, ensure that values other than columns do not appear in the SET clause by specifying the exact column as the target of the set clause, as shown in the example of the โcorrected queryโ below.
Case 1. Table is defined as varchar, but the set clause target uses the trim function
SQL> desc t3; COLUMN_NAME TYPE CONSTRAINT ---------------------------------------------------------------------------- C1 VARCHAR(20) --Query causing error SQL> update t3 set trim(c1) = 'a'; --Corrected query SQL> update t1 set c1 = 'a';
Case 2. Table is defined as date, but the set clause target uses to_ functions
SQL> desc t1;
COLUMN_NAME TYPE CONSTRAINT
----------------------------------------------------------------------------
C1 DATE
--Query causing error
SQL > update t1 set to_date(c1,'YYYY-MM-DD') = to_date('2024-05-31', 'YYYY-MM-DD');
--Corrected query
SQL > update t1 set c1 = to_date(sysdate, 'yyyy-mm-dd');