[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2214) SQLStateConverter chooses wrong JDBCException: Locks and MySQL
Anders Wallgren (JIRA)
noreply at atlassian.com
Thu Jan 25 18:02:22 EST 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2214?page=comments#action_25928 ]
Anders Wallgren commented on HHH-2214:
--------------------------------------
Attached patch, basedon 3.2.2GA source.
> SQLStateConverter chooses wrong JDBCException: Locks and MySQL
> --------------------------------------------------------------
>
> Key: HHH-2214
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2214
> Project: Hibernate3
> Type: Bug
> Components: core
> Versions: 3.2.0.ga
> Environment: Hibernate 3.2.0
> MySQL 4.1.14 and 5.0.24
> Reporter: Christian Gruber
> Priority: Minor
> Attachments: SQLStateConverter.patch
>
>
> In MySQL, there are (at least) two SQL states that signal some problems with locks: 40001 and 41000. Currently, the SQLStateConverter maps the state 40001 to a LockAcquisitionException and the state 41000 to a GenericJDBCException. Could the state 41000 also be mapped to a LockAcquisitionException, or can this cause problems with other databases?
> Here the corresponding JDBC exception:
> java.sql.SQLException: Deadlock found when trying to get lock; Try restarting transaction, message from server: "Lock wait timeout exceeded; try restarting transaction"
> (error code: 1205; sql state: 41000)
> Christian Gruber
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list