/** * */ package testsuite.simple; import java.sql.Connection; import java.sql.ResultSet; import java.util.Properties; import testsuite.BaseTestCase; /** * @author Tonci * */ public class TestBug38747 extends BaseTestCase { /** * @param name */ public TestBug38747(String name) { super(name); // TODO Auto-generated constructor stub } public void testBug38747() throws Exception { System.out.println("java.vm.version : " + System.getProperty("java.vm.version")); System.out.println("java.vm.vendor : " + System.getProperty("java.vm.vendor")); System.out.println("java.runtime.version : " + System.getProperty("java.runtime.version")); System.out.println("os.name : " + System.getProperty("os.name")); System.out.println("os.version : " + System.getProperty("os.version ")); System.out.println("sun.management.compiler : " + System.getProperty("sun.management.compiler")); Connection rewriteConn = null; Properties props = new Properties(); props.put("jdbcCompliantTruncation","true"); props.put("useInformationSchema","true"); try { rewriteConn = getConnectionWithProps(props); rewriteConn.setReadOnly(true); this.pstmt = rewriteConn.prepareStatement("SELECT 1",ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); this.pstmt.setFetchSize(Integer.MIN_VALUE); this.rs = this.pstmt.executeQuery(); while (this.rs.next()) { System.out.println(this.rs.getObject(1).getClass().getName()); System.out.println(this.rs.getInt(1)); } this.rs.close(); this.pstmt.close(); rewriteConn.close(); props.clear(); } finally { closeMemberJDBCResources(); } } /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub junit.textui.TestRunner.run(TestBug38747.class); } }