mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved mysql exception sorter
This commit is contained in:
@@ -24,12 +24,13 @@ public class MySqlExceptionSorter implements ExceptionSorter {
|
||||
|
||||
@Override
|
||||
public boolean isExceptionFatal(SQLException e) {
|
||||
String sqlState = e.getSQLState();
|
||||
final String sqlState = e.getSQLState();
|
||||
final int errorCode = e.getErrorCode();
|
||||
|
||||
if (sqlState != null && sqlState.startsWith("08")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (errorCode) {
|
||||
// Communications Errors
|
||||
case 1040: // ER_CON_COUNT_ERROR
|
||||
|
||||
Reference in New Issue
Block a user