Bug #3580 | PreparedStatement hangs/crashes server | ||
---|---|---|---|
Submitted: | 27 Apr 2004 15:52 | Modified: | 20 Dec 2004 23:58 |
Reporter: | Karl Niemeier | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / J | Severity: | S1 (Critical) |
Version: | mysql-connector-java-3.1-nightly-2004042 | OS: | Windows (Windows XP Pro 2002) |
Assigned to: | Mark Matthews | CPU Architecture: | Any |
[27 Apr 2004 15:52]
Karl Niemeier
[29 Apr 2004 20:42]
Karl Niemeier
After I found this problem, I was curious whether I could get the unit tests that are part of the Connector/J distribution to run successfully. I tried running StatementsTest.java and it passed the first few tests but hit the same problem that I described in this bug when it was in testPreparedStatement. It is hanging on the InputStream read in readFully(). Server not responding?
[29 Apr 2004 20:59]
Mark Matthews
The issue arrises because the driver checks if it's talking to a MySQL server version 4.1.2 or newer...The protocol for prepared statements changed slightly in 4.1.2...(there's more data sent back to the client)... However, those changes have not been merged 'forward' into 5.0 yet, so the driver hangs forever waiting to read data that is not there. You will have to wait until 5.0.1 is released which will contain the changes in 4.1.2, or disable server-side prepared statements entirely by using the 'useServerPrepStmts=false' property in your JDBC connection URL.
[20 Dec 2004 23:58]
Mark Matthews
Thank you for your bug report. This issue has already been fixed in the latest released version of that product, which you can download at http://www.mysql.com/downloads/