---------- Forwarded message ---------- From: Diego Dupin <diego.dupin@mariadb.com> Date: Tue, Mar 29, 2016 at 10:15 PM Subject: java.sql.Timestamp works in MySQL, fails in MariaDB To: lyallex@gmail.com Hi, That must normally work, since the mysql connector use the same binary protocol. Could you send the exact connection string to know the options you use ? Diego Recently I changed servers, my old server was running MySQL and my
Java code worked perfectly. My new server is apparently running Ver 15 5.5.44-MariaDB, for Linux (x86 64) The following code works and has worked perfectly well for the past 4 years java.sql.Timestamp transactionTimestamp = new java.sql.Timestamp(System.currentTimeMillis()); PreparedStatement pstmt ... pstmt.setTimestamp(4, transactionTimestamp); pstmt.executeUpdate(); // EPIC FAIL, writes all 0s to the database I'm currently using mysql-connector-java-5.1.22-bin.jar in WEB-INF/lib Can anyone throw any light on this please? Many thanks Lyallex