/** * Full JVM settings and connection string: * -Xmx512M -XX:+UseParallelGC -Dcom.mysql.jdbc.testsuite.url.default=jdbc:mysql://localhost:3306/test?user=root&password=*****&UseUnicode=true&dumpMetadataOnColumnNotFound=true&zeroDateTimeBehaviour=convertToNull&noDatetimeStringSync=true&useServerPrepStmts=true */ package testsuite.simple; import testsuite.BaseTestCase; /** * @author Tonci * */ public class TestBug32525 extends BaseTestCase { /** * @param name */ public TestBug32525(String name) { super(name); // TODO Auto-generated constructor stub } public void testBug32525() 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 { createTable("bug32525", "(ID int4 not null auto_increment primary key, tm date not null)"); this.pstmt = this.conn.prepareStatement("INSERT INTO bug32525 SET tm = \"0000-00-00\""); this.pstmt.execute(); this.pstmt = this.conn.prepareStatement("SELECT * FROM bug32525"); this.rs = this.pstmt.executeQuery(); assertTrue(this.rs.next()); String badDatetime = this.rs.getString("tm"); System.out.println("badDateTime = " + badDatetime); assertEquals("0000-00-00", badDatetime); } finally { closeMemberJDBCResources(); } } /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub junit.textui.TestRunner.run(TestBug32525.class); } }