TeslaCN opened a new issue #10898:
URL: https://github.com/apache/shardingsphere/issues/10898


   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   5.0.0-beta
   
   ### Expected behavior
   When using PostgreSQL JDBC driver, we can `setFetchSize(1)` and 
`setAutoCommit(false)`. The returned ResultSet will use cursor and we can fetch 
rows as we need.
   
   ### Actual behavior
   Even the client specify a named portal and fetch size, the Proxy will return 
all rows. 
   
   ### Example codes for reproduce this issue (such as a github link).
   ```java
   connection.setAutoCommit(false);
   // A select statement whose results are more than a row.
   try (PreparedStatement preparedStatement = 
connection.prepareStatement("SELECT ......")) { 
       preparedStatement.setFetchSize(1);
       // Set parameters
       try (ResultSet resultSet = preparedStatement.executeQuery()) {
           while (resultSet.next()) {
               System.out.println(resultSet.getInt("no_o_id"));
           }
       }
   }
   connection.rollback();
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to