---------- Forwarded message ----------
From: Diego Dupin <diego.du...@mariadb.com>
Date: Tue, Mar 29, 2016 at 10:15 PM
Subject: java.sql.Timestamp works in MySQL, fails in MariaDB
To: lyal...@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
_______________________________________________
Mailing list: https://launchpad.net/~maria-discuss
Post to     : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to