Skip to content

Commit 0c1df5f

Browse files
committed
HHH-13698 : Hibernate does not recognize MySQL 8 error code 3572 as PessimisticLockException
1 parent a7f017c commit 0c1df5f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

hibernate-core/src/main/java/org/hibernate/dialect/MySQLDialect.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,8 @@ public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate() {
532532
@Override
533533
public JDBCException convert(SQLException sqlException, String message, String sql) {
534534
switch ( sqlException.getErrorCode() ) {
535-
case 1205: {
535+
case 1205:
536+
case 3572: {
536537
return new PessimisticLockException( message, sqlException, sql );
537538
}
538539
case 1207:

0 commit comments

Comments
 (0)