Bug #11360 Connector/J dumping query into SQLException twice
Submitted: 15 Jun 2005 19:57 Modified: 31 Mar 2014 9:23
Reporter: Craig Carper Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Connector / J Severity:S3 (Non-critical)
Version:3.1.8 OS:Microsoft Windows (Windows XP)
Assigned to: Alexander Soklakov CPU Architecture:Any

[15 Jun 2005 19: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 5: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 ?
[17 Jul 2005 23: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".
[31 Mar 2014 9:23] Alexander Soklakov
I close this report as "Can't repeat" because there is no feedback for a long time and codebase is too old. Please, feel free to reopen it if the problem still exists in current driver.