Document Type | Troubleshooting
Category | Administration
Applicable Product Version | 7FS02
Document Number | TADTS012
Issue
When removing duplicate values in the IN clause where the data types of Elements differ, an Internal Error as shown below occurs during SELECT execution, causing the session to terminate abnormally.
- Internal Error with condition: 'number_is_valid_ptr((x))' (7 args)
Test Scenario
Creating Test Data
SQL>create table test (c1 varchar(100), c2 number);
SQL>insert into test values ('TEST01',1);
SQL>insert into test values ('TEST02',2);
SQL>insert into test values ('TEST03',3);
SQL>insert into test values ('TEST04',4);
SQL>insert into test values ('TEST05',5);
SQL>insert into test values ('TEST06',6);Case Causing TBR-2131: Generic I/O error.
SQL>select * from test where c2 in ('3','4','1','1');Normal Operation Case
SQL>select * from test where c2 in ('3','4',to_number('1'),to_number('1')); Cause
An Internal Error occurred because the data types differed at the time the arguments were stored in the hash table during the duplicate value removal process in the IN clause.
Solutions
The issue was resolved by correcting the data types specified in the IN clause or applying a patch that improved the Type Casting logic.
ReferenceYou can work around this by casting the data types of the arguments in the IN clause to be the same before use.
'1' -> to_number('1')
'1' -> 1