Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
2.7.3
-
None
Description
The javadoc of java.sql.SQLTransientConnectionException[1] states:
```
The subclass of SQLException for the SQLState class value '08', or under vendor-specified conditions.
```
So SQLState with value '08' is expected to be mapped to SQLTransientConnectionException. However, the JDBC driver code[2], currently maps it to SQLNonTransientConnectionException instead:
```
case "08":
returnEx = new SQLNonTransientConnectionException(msg, sqlState, errorCode, cause);
break;
```
[1] https://docs.oracle.com/javase/8/docs/api/java/sql/SQLTransientConnectionException.html
[2] https://github.com/mariadb-corporation/mariadb-connector-j/blob/master/src/main/java/org/mariadb/jdbc/util/exceptions/ExceptionFactory.java#L221