Hello,
I just upgraded both parts and am running my unit tests, and I am
getting a data truncation error.
The column is of char[2] and I am trying to put into it a value of '00'.
Any idea why I would be getting this error?
Thanx.
James,
I've tried to repeat your issue with MySQL and 5.0.2 and Connector/J 3.1.4
locally here, and can't repeat it. Is there any chance you can take a look
at the following test case and point out anything that is different you
are doing that might be causing the bug.
public void testTruncationWithChar() throws Exception {
try {
this.stmt.executeUpdate("DROP TABLE IF EXISTS testTruncationWithChar");
this.stmt.executeUpdate("CREATE TABLE testTruncationWithChar (field1
char(2))");
this.pstmt = this.conn.prepareStatement("INSERT INTO
testTruncationWithChar VALUES (?)");
this.pstmt.setString(1, "00");
this.pstmt.executeUpdate();
} finally {
this.stmt.executeUpdate("DROP TABLE IF EXISTS testTruncationWithChar");
}
}
-Mark