OPENJPA-2857 handle sqlState 70100 as QueryTimeoutException

This commit is contained in:
Mark Struberg 2021-04-03 16:08:13 +02:00
parent ab8090f556
commit 8d3acdc11e
2 changed files with 3 additions and 2 deletions

View File

@ -469,7 +469,8 @@ public class MariaDBDictionary extends DBDictionary {
@Override @Override
public boolean isFatalException(int subtype, SQLException ex) { public boolean isFatalException(int subtype, SQLException ex) {
if ((subtype == StoreException.LOCK && ex.getErrorCode() == 1205) if ((subtype == StoreException.LOCK && ex.getErrorCode() == 1205) // ER_LOCK_WAIT_TIMEOUT
||(subtype == StoreException.LOCK && ex.getErrorCode() == 1969) // general ER_STATEMENT_TIMEOUT
||(subtype == StoreException.LOCK && "JZ0002".equalsIgnoreCase(ex.getSQLState())) ||(subtype == StoreException.LOCK && "JZ0002".equalsIgnoreCase(ex.getSQLState()))
||(subtype == StoreException.QUERY && ex.getErrorCode() == 1317)) { ||(subtype == StoreException.QUERY && ex.getErrorCode() == 1317)) {
return false; return false;

View File

@ -164,7 +164,7 @@
</dictionary> </dictionary>
<dictionary class="org.apache.openjpa.jdbc.sql.MariaDBDictionary"> <dictionary class="org.apache.openjpa.jdbc.sql.MariaDBDictionary">
<lock>41000</lock> <lock>41000,70100</lock>
<referential-integrity>630,839,840,893,1062,1169,1215,1216,1217,1451,1452,1557</referential-integrity> <referential-integrity>630,839,840,893,1062,1169,1215,1216,1217,1451,1452,1557</referential-integrity>
<object-exists>23000</object-exists> <object-exists>23000</object-exists>
<object-not-found></object-not-found> <object-not-found></object-not-found>