3 messages in com.mysql.lists.javaRe: MySQL Connector/J Bug (?)
FromSent OnAttachments
Sascha Zelzer28 Nov 2003 07:11 
Mark Matthews28 Nov 2003 17:38 
Sascha Zelzer28 Nov 2003 19:03 
Subject:Re: MySQL Connector/J Bug (?)
From:Sascha Zelzer (sasc@gmx.net)
Date:11/28/2003 07:03:04 PM
List:com.mysql.lists.java

Yes, the nightly snapshot solves my problems! Now it works just as expected, thanks. Next time I test a snapshot before posting... ;-)

Sascha

On Fri Nov 28, 2003 at 07:38:22PM -0600, Mark Matthews wrote:

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 · Sascha Zelzer wrote: ·

Hi!

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

· This should be fixed in the nightly builds of Connector/J 3.0 (it was fixed some time back, but hasn't made it into a release yet). · Please let me know if a nightly snapshot from http://downloads.mysql.com/snapshots.php fixes the issue for you (PreparedStatement.setBlob() is used in the testsuite, and that is run on every check-in). · »·····-Mark · - -- Mr. Mark Matthews MySQL AB, Software Development Manager, J2EE and Windows Platforms Office: +1 708 557 2388 www.mysql.com · Are you MySQL Certified? http://www.mysql.com/certification/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org · iD8DBQE/x/iNtvXNTca6JD8RAuG2AJsE3Gj2aJ8ys5CIdOIvYqQMISq1uQCfUeBp /qk0thR8lvX7idNvCRTyx20= =A82H -----END PGP SIGNATURE----- · ·

-- Neu bei GMX: Preissenkung für MMS-Versand und FreeMMS!

Ideal für alle, die gerne MMS verschicken: 25 FreeMMS/Monat mit GMX TopMail. http://www.gmx.net/de/cgi/produktemail

+++ GMX - die erste Adresse für Mail, Message, More! +++