Hi!
As of my previous post, I am having troubles updating blob fields via the jdbc calls from Connector/J 3.0.9 to a MySQL 4.0.16 server on a Debian Linux system. I isolated the problem to be a weird function call in com.mysql.jdbc.PreparedStatement.java at line 358:
ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
bytesOut.write('\\'');
--> escapeblockFast(x.getBytes(1, (int)x.length()), bytesOut, Integer.MAX_VALUE);
where x is a java.sql.Blob. The function escapeblockFast() iterates over the byte[] given by the first argument Integer.MAX_VALUE times and therefore always throws an ArrayIndexOutOfBoundsException (until the byte[] has size Integer.MAX_VALUE).
Is this bug known? Has anyone suceeded in updating blob's via the ResultSet.updateBlob() method ever?
Thanks for comments,
Sascha