public void testBug27412() throws Exception {
  Properties props=new Properties();
  props.put("useServerPrepStmts","false");
  props.put("cachePreparedStatements","true");
  props.put("cacheResultSetMetadata","true");
  Connection conn2=getConnectionWithProps(props);
  PreparedStatement pstm=conn2.prepareStatement("SELECT 1");
  try {
    assertTrue(pstm.execute());
  }
  finally {
    pstm.close();
    conn2.close();
  }
}

public void testBug27412 ( ) throws Exception { Properties props = new Properties ( ) ; props . put ( "useServerPrepStmts" , "false" ) ; props . put ( "cachePreparedStatements" , "true" ) ; props . put ( "cacheResultSetMetadata" , "true" ) ; Connection conn2 = getConnectionWithProps ( props ) ; PreparedStatement pstm = conn2 . prepareStatement ( "SELECT 1" ) ; try { assertTrue ( pstm . execute ( ) ) ; } finally { pstm . close ( ) ; conn2 . close ( ) ; } }
tests fix for bug # 27412 - cached metadata with preparedstatement . execute ( ) throws nullpointerexception .
