johnou commented on PR #411: URL: https://github.com/apache/commons-dbcp/pull/411#issuecomment-2278437033
I feel regex would be over the top and most likely result in a regression in performance, I will stick with [1] for now, however it does feel a little brittle as more codes beginning with "08" may be added in later versions. I've collected all the relevant codes from https://dev.mysql.com/doc/connectors/en/connector-j-reference-error-sqlstates.html [1] ``` public void setDriverClassName(String driverClassName) { if ("software.amazon.jdbc.Driver".equals(driverClassName)) { final Set<String> sqlCodes = Utils.getDisconnectionSqlCodes(); sqlCodes.add("08000"); sqlCodes.add("08001"); sqlCodes.add("08002"); sqlCodes.add("08003"); sqlCodes.add("08004"); sqlCodes.add("08006"); sqlCodes.add("08S01"); // excluded for aurora failover //sqlCodes.add("08007"); //sqlCodes.add("08S02"); setDisconnectionSqlCodes(sqlCodes); setFastFailValidation(true); } super.setDriverClassName(driverClassName); } ``` Thanks for taking the time to review the proposal and provide feedback! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
