Wrong Results Are Returned When Query Uses In List

(Doc ID 2418274.1)

Last updated on JULY 05, 2018

Applies to:

JDBC - Version 12.1.0.2.0 and later
Information in this document applies to any platform.

Symptoms


When attempting to fetch data in an application using JDBC 12.1.0.2, all data is returned correctly, except from row 11 onward constantly displaying the same value (incorrect) instead of the correct value.
A list of values is passed to a query in an IN list.
This is the query for example:
 SELECT id FROM tabcode WHERE id in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?))

These are the bind variables being passed (note that id=9503551 is not included in the IN list):

Enter: 1, 4100311
Enter: 2, 4100342
Enter: 3, 4256435
Enter: 4, 4258518
Enter: 5, 5999451
Enter: 6, 7281436
Enter: 7, 8561202
Enter: 8, 8569844
Enter: 9, 8573830
Enter: 10, 8600454
Enter: 11, 9189915
Enter: 12, 9198378
Enter: 13, 9261882
Enter: 14, 9261883
Enter: 15, 9261886
Enter: 16, 9384855
Enter: 17, 9384856
Enter: 18, 9393016
Enter: 19, 9456406
Enter: 20, 9456732
Enter: 21, 9498044
Enter: 22, 9537627
Enter: 23, 9546505
Enter: 24, 9546800
Enter: 25, 4256435
Enter: 26, 4256435
Enter: 27, 4256435


However, this is the data returned:


0 4256435 
1 4258518 
2 5999451 
3 7281436 
4 8569844 
5 9198378 
6 9261882 
7 9261883 
8 9261886 
9 9393016 
10 9546505
11 9503551
12 9503551
13 9503551 
14 9503551 
15 9503551 
16 9503551 
17 9503551 
18 9503551 
19 9503551 
20 9503551 
21 9503551 


Changes

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms