From 4eb7f1770f2ffd2cd074e6026bd091b2eb7ac3b0 Mon Sep 17 00:00:00 2001 From: lidongy <1879087903@qq.com> Date: Tue, 4 Jan 2022 14:55:01 +0800 Subject: [PATCH] =?UTF-8?q?DEC-22102=20fix:=E3=80=90=E4=B8=93=E9=A2=98?= =?UTF-8?q?=E3=80=9111.0=E5=B7=A5=E7=A8=8B=EF=BC=8C=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E7=AE=A1=E7=90=86=EF=BC=8CINFORMIX=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=BF=9E=E6=8E=A5=E5=A4=B1=E8=B4=A5=EF=BC=8C=E9=A9=B1?= =?UTF-8?q?=E5=8A=A8=E7=AE=A1=E7=90=86=E4=B8=8A=E4=BC=A0=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E6=88=90=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../druid/pool/DruidConnectionHolder.java | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/fine-druid/src/main/java/com/fr/third/alibaba/druid/pool/DruidConnectionHolder.java b/fine-druid/src/main/java/com/fr/third/alibaba/druid/pool/DruidConnectionHolder.java index 8ac60c646..788518c36 100644 --- a/fine-druid/src/main/java/com/fr/third/alibaba/druid/pool/DruidConnectionHolder.java +++ b/fine-druid/src/main/java/com/fr/third/alibaba/druid/pool/DruidConnectionHolder.java @@ -77,22 +77,22 @@ public final class DruidConnectionHolder { protected String initSchema; public DruidConnectionHolder(DruidAbstractDataSource dataSource, PhysicalConnectionInfo pyConnectInfo) - throws SQLException{ + throws SQLException{ this(dataSource, - pyConnectInfo.getPhysicalConnection(), - pyConnectInfo.getConnectNanoSpan(), - pyConnectInfo.getVairiables(), - pyConnectInfo.getGlobalVairiables()); + pyConnectInfo.getPhysicalConnection(), + pyConnectInfo.getConnectNanoSpan(), + pyConnectInfo.getVairiables(), + pyConnectInfo.getGlobalVairiables()); } public DruidConnectionHolder(DruidAbstractDataSource dataSource, Connection conn, long connectNanoSpan) - throws SQLException{ + throws SQLException{ this(dataSource, conn, connectNanoSpan, null, null); } public DruidConnectionHolder(DruidAbstractDataSource dataSource, Connection conn, long connectNanoSpan, Map variables, Map globleVariables) - throws SQLException{ + throws SQLException{ this.dataSource = dataSource; this.conn = conn; this.createNanoSpan = connectNanoSpan; @@ -136,11 +136,16 @@ public final class DruidConnectionHolder { holdabilityUnsupported = true; } LOG.warn("getHoldability error", e); + } catch (AbstractMethodError e){ + LOG.warn("getHoldability error", e); } } } - this.underlyingReadOnly = conn.isReadOnly(); + try { + this.underlyingReadOnly = conn.isReadOnly(); + } catch (Throwable e){ + } try { this.underlyingTransactionIsolation = conn.getTransactionIsolation(); } catch (SQLException e) { @@ -322,7 +327,7 @@ public final class DruidConnectionHolder { Statement stmt = (Statement) item; JdbcUtils.close(stmt); } - + statementTrace.clear(); } finally { lock.unlock();