Max Rows Not returned When Using Fetchsize With JDBC 12.1.0.2 OCI Driver (Doc ID 2011175.1)

Last updated on MAY 20, 2015

Applies to:

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

Symptoms

Max rows is not returned when using the combination of fetch size via the Statement.setFetchSize() method, and max rows via the Statement.setMaxRows() method used with the JDBC 12.1.0.2  OCI driver.
The issue only turns up when 'max rows' is between 'fetch size' and 'fetchsize * 2'. So with out-of-the-box fetch size of 10, it only happens when 'maxrows' is between 10 and 20 (e.g. 1).
All other cases behave normally and 'max rows' rows are returned.

The issue can be reprodiuced with the folliwng testcase:

 

The issue does not occur with JDBC Thin, or when there are less records in the table.

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