From 4f11cba18a9009cb6e187df080358c3758c5006b Mon Sep 17 00:00:00 2001 From: Pinaki Poddar Date: Thu, 18 Mar 2010 05:54:26 +0000 Subject: [PATCH] OPENJPA-1565: Some MySQL drivers return 0 error code for timeout exception git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@924651 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/openjpa/jdbc/sql/MySQLDictionary.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MySQLDictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MySQLDictionary.java index 6f5f8bce8..6efadb88b 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MySQLDictionary.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MySQLDictionary.java @@ -428,6 +428,8 @@ public class MySQLDictionary ||(subtype == StoreException.QUERY && ex.getErrorCode() == 1317)) { return false; } + if (ex.getErrorCode() == 0 && ex.getSQLState() == null) + return false; return super.isFatalException(subtype, ex); }