Bug 9064 Not Quite Fixed (3.1.10)?
Posted by: Jason Winnebeck
Date: July 26, 2005 09:28AM

As our app was having slow performance on statement prepare, out of curiousity I checked on Bug 9064: com.mysql.jdbc.PreparedStatement.ParseInfo does unnecessary call to toCharArray().

I checked version 3.1.7 vs 3.1.10.

The fix that I saw as of 3.1.10 doesn't fix the problem. It moves the toCharArray outside of the loop, which could be better, but still the call is unnecessary because there is no reason to copy the string. Instead why not use substring? substring uses a package-private constructor to construct a string that shares the buffer -- since String is immutable, there is no reason to force a string copy with toCharArray.

If I am missing something, please enlighten me? I will try to test the code change to use substring instead of toCharArray, but I don't know the driver inside and out so my testing won't be very useful from a true validation standpoint.

Jason Winnebeck
Center for Integrated Manufacturing Studies
Rochester Institute of Technology, Rochester NY

Options: ReplyQuote


Subject
Written By
Posted
Bug 9064 Not Quite Fixed (3.1.10)?
July 26, 2005 09:28AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.