Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
//there is 1 row in table t1.
String query = "SELECT * FROM t1 WHERE id=? AND name=?";
conn.setAutoCommit(true);
try {
PreparedStatement statement = conn.prepareStatement(query);
statement.setString(1, "1");
statement.setString(2, "1");
ResultSet rs = statement.executeQuery();
assertTrue(rs.next());
assertFalse(rs.next());
rs.close();
// Run another query through same connection and make sure
// you can't find the new row
rs = statement.executeQuery();
assertTrue(rs.next());//Error here
} finally {
}