Bug #11360 Connector/J dumping query into SQLException twice
Submitted: 15 Jun 2005 21:57 Modified: 17 Jul 2005 7:44
Reporter: Craig Carper
Status: No Feedback
Category:Connector/J Severity:S3 (Non-critical)
Version:3.1.8 OS:Microsoft Windows (Windows XP)
Assigned to: Target Version:

[15 Jun 2005 21:57] Craig Carper
Description:
Connector/J version mysql-connector-java-3.1.8
MySQL server 4.1.12
Windows XP

When Connector/J is configured with "dumpQueriesOnException=true", it appears to include
the offending query TWICE in the SQLException.  (When "dumpQueriesOnException=flase", no
query appears in the SQLException.)  

For example, in one instance, e.getMessage() contained the following:

Retry-able exception in database transaction: Lock wait timeout exceeded; try restarting
transaction

Query being executed when exception was thrown:

com.mysql.jdbc.ServerPreparedStatement[15] - UPDATE Folders SET estimated_close_date =
'2005-07-02', latest_note_date = NOW() WHERE folder_id = 3858

Query being executed when exception was thrown:

com.mysql.jdbc.ServerPreparedStatement[15] - UPDATE Folders SET estimated_close_date =
'2005-07-02', latest_note_date = NOW() WHERE folder_id = 3858

How to repeat:
(I forced a lock timeout by selecting a record for update using the mysql command line
tool, before using my application to update the same record.  Hopefully this is
relatively easy to confirm.)
[17 Jun 2005 7:44] Vasily Kishkin
I was not able to got the error message. Could you please write here simple test case and
definition of your table ?
[18 Jul 2005 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".