Subject Re: Another driver bug
Author Roman Rokytskyy
Hi,

> Here are steps to reproduce it.

Here's a test case for your steps. With it I could not reproduce the
problem with CVS version of the driver. Can you please check what's
wrong with it? Also please check your test case with latest version of
the driver (probably CVS one, but beta 3 should also be ok). I have
added a check for null value and it should throw some exception with
message "please report to the driver developer.".

public void testNPEInFieldIsNull() throws Exception {
Connection connection = getConnectionViaDriverManager();
try {
CallableStatement cs =
connection.prepareCall(CALL_INIT_TEST_PROCEDURE);
try {
cs.execute();
} catch(SQLException ex) {
assertTrue("Should generate arithmetic exception.
Current code " +
ex.getErrorCode() + ", message " +
ex.getMessage(),
ex.getErrorCode() == 335544321);
} finally {
cs.close();
}

Statement stmt = connection.createStatement();
try {
ResultSet rs = stmt.executeQuery("SELECT * FROM test");
while(rs.next())
rs.getObject(1);
} finally {
stmt.close();
}

} finally {
connection.close();
}
}


Thanks!
Roman