/** * */ package testsuite.simple; import java.sql.CallableStatement; import java.sql.Connection; import java.util.Properties; import testsuite.BaseTestCase; public class TestBug43556 extends BaseTestCase { public TestBug43556(String name) { super(name); // TODO Auto-generated constructor stub } public void testBug43556() throws Exception { try { 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 : " + System.getProperty("os.name") + ", " + System.getProperty("os.version") + ", " + System.getProperty("os.arch")); System.out.println("sun.management.compiler : " + System.getProperty("sun.management.compiler")); System.out.println("-------------------------------------------------"); Properties props = new Properties(); props.put("jdbcCompliantTruncation", "true"); props.put("useInformationSchema","true"); Connection conn1 = null; try { conn1 = getConnectionWithProps(props); this.stmt.executeUpdate("DROP TABLE IF EXISTS bug43556"); this.stmt.executeUpdate("DROP VIEW IF EXISTS vbug43556"); createTable("`bug43556`", "(`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY, `VChr` VARCHAR(20)) ENGINE=MyISAM DEFAULT CHARSET=latin1;"); assertEquals(1, this.stmt.executeUpdate("INSERT INTO bug43556 VALUES (NULL, 'Row 1')")); this.stmt.execute("CREATE VIEW vbug43556 AS SELECT * FROM bug43556"); this.rs = this.stmt.executeQuery("SELECT test.vbug43556.VChr FROM vbug43556"); assertTrue(this.rs.next()); assertEquals("Row 1", this.rs.getString("vbug43556.VChr")); }finally { if (conn1 != null) { conn1.close(); } } } finally { closeMemberJDBCResources(); } } /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub junit.textui.TestRunner.run(TestBug43556.class); } }