It seems that Statement doesn't honor setMaxSize() when doing calls to stored procedures. Is this a bug or a feature? Or am I mistaken?
The code below gives more than 2 rows (if any_proc() returns more).
I'm using 5.1.21 connector/j (latest?)
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/db", "root", "root");
Statement statement = connection.createStatement();
statement.setMaxRows(2);
ResultSet resultSet = statement.executeQuery("call any_proc()");
while (resultSet.next()) {
System.out.println("got one");
}
connection.close();
The code below gives more than 2 rows (if any_proc() returns more).
I'm using 5.1.21 connector/j (latest?)
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/db", "root", "root");
Statement statement = connection.createStatement();
statement.setMaxRows(2);
ResultSet resultSet = statement.executeQuery("call any_proc()");
while (resultSet.next()) {
System.out.println("got one");
}
connection.close();