title: Closing a streaming result set (using mysql jdbc) takes a long time
body: <p>I am using the following code to create a prepared statement and a streaming result set. Turns out that in some cases the result set is fairly large but I would like to close it after consuming a couple of thousand rows. However, close seems to run through all remaining results -- see this link for the definition of close:  <a href="http://love.isti.com/libs/MySQL/com/mysql/jdbc/RowDataDynamic.java" rel="nofollow">http://love.isti.com/libs/MySQL/com/mysql/jdbc/RowDataDynamic.java</a></p>
  
  <p><code>statement = db.conn().prepareStatement(query,                                                                             java.sql.ResultSet.TYPE_FORWARD_ONLY,                                                                     java.sql.ResultSet.CONCUR_READ_ONLY);
  db.setFetchSize(statement, kFetchSize);</code></p>
  
  <p>I would like to close the result set (and/or statement) immediately without iterating through all the remaining results. Is that possible?</p>
  
  <p>I also tried to move cursor to the end of the result set (afterLast) but that is not supported for streaming result sets. And, not using streaming result sets is not an option since result sets can sometimes be very large, and I don't want to get all of the results to the client.</p>
  
  <p>thanks</p>