/** * */ package testsuite.simple; import java.sql.CallableStatement; import java.sql.ResultSet; import testsuite.BaseTestCase; /** * @author Tonci * */ public class TestBug38554 extends BaseTestCase { /** * @param name */ public TestBug38554(String name) { super(name); // TODO Auto-generated constructor stub } public void testBug38554() 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")); try { // Create test table and function this.stmt = this.conn.createStatement(); this.stmt.executeUpdate("DROP TABLE IF EXISTS test38554"); this.stmt.executeUpdate("CREATE TABLE test38554 ( " + "c0 INT NOT NULL PRIMARY KEY " + ") " + "ENGINE=InnoDB DEFAULT CHARSET=latin1; "); this.stmt.executeUpdate("DROP PROCEDURE IF EXISTS test_function38554"); this.stmt.executeUpdate("CREATE PROCEDURE test_function38554 (p0 INT)" + "BEGIN " + "SELECT * FROM test38554 WHERE c0 = p0;" + "END; "); // Prepare the function call CallableStatement callable = this.conn.prepareCall("{call test_function38554(?)}",ResultSet.TYPE_FORWARD_ONLY,ResultSet.CONCUR_READ_ONLY); callable.setFetchSize(1); callable.setInt(1,2); callable.execute(); this.rs = callable.getResultSet(); } finally { closeMemberJDBCResources(); } } /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub junit.textui.TestRunner.run(TestBug38554.class); } }