mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
remove mysql warnnings
This commit is contained in:
@@ -91,6 +91,7 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// stats
|
||||
private final AtomicLong recycleErrorCount = new AtomicLong();
|
||||
private long connectCount = 0L;
|
||||
private long closeCount = 0L;
|
||||
private final AtomicLong connectErrorCount = new AtomicLong();
|
||||
@@ -265,6 +266,7 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
|
||||
preparedStatementCount.set(0);
|
||||
transactionHistogram.reset();
|
||||
cachedPreparedStatementDeleteCount.set(0);
|
||||
recycleErrorCount.set(0);
|
||||
}
|
||||
|
||||
public boolean isEnable() {
|
||||
@@ -469,12 +471,6 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
|
||||
initExceptionSorter();
|
||||
initValidConnectionChecker();
|
||||
|
||||
if (driver.getClass().getName().equals("com.mysql.jdbc.Driver")) {
|
||||
if (this.isPoolPreparedStatements()) {
|
||||
LOG.error("mysql should not use 'PoolPreparedStatements'");
|
||||
}
|
||||
}
|
||||
|
||||
if (useGloalDataSourceStat) {
|
||||
dataSourceStat = JdbcDataSourceStat.getGlobal();
|
||||
if (dataSourceStat == null) {
|
||||
@@ -1042,8 +1038,13 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
|
||||
}
|
||||
|
||||
LOG.error("recyle error", e);
|
||||
recycleErrorCount.incrementAndGet();
|
||||
}
|
||||
}
|
||||
|
||||
public long getRecycleErrorCount() {
|
||||
return recycleErrorCount.get();
|
||||
}
|
||||
|
||||
public void clearStatementCache() throws SQLException {
|
||||
lock.lock();
|
||||
|
||||
Reference in New Issue
Block a user