When Using JDBC 21.3, A Query Returns Additional Rows If The Client Result Cache Is Enabled
(Doc ID 2852061.1)
Last updated on JULY 22, 2022
Applies to:
JDBC - Version 21.3 and laterInformation in this document applies to any platform.
Symptoms
When client result cache is enabled, second execution of a same SQL statement returns additional row in the result set while using the JDBC 21.3.
This problem affects JDBC 21.3 drivers (ojdbc8.jar and ojdbc11.jar).
The problem is not reproduced using JDBC 21.1 or 19.12.
This can be reproduced using the next program test.
- Enable client_result_cache_size in the database.
- Replace DB_URL, USER and PASS with the correct environment in the ClientResultCache213jdbc.java file.
- Run the program using java 11.
java -cp ojdbc11.jar ClientResultCache213jdbc.java
java -cp ojdbc8.jar ClientResultCache213jdbc.java
Output:
client_result_cache_size : 32768
The first execution of a query returns a correct result set
id : 1
When using 21.3 version of ojdbc8.jar or ojdbc11.jar, the second execution of the same query returns an additional row in the result set:
id : 1
id : 0
The end!
Changes
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Changes |
Cause |
Solution |
References |