mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed for pscache, if preparedStatement throw exception, removed from pscache. issue #1052
This commit is contained in:
@@ -164,7 +164,7 @@ public class DruidPooledConnection extends PoolableWrapper implements javax.sql.
|
||||
}
|
||||
|
||||
stmt.getPreparedStatementHolder().decrementInUseCount();
|
||||
if (stmt.isPooled() && holder.isPoolPreparedStatements()) {
|
||||
if (stmt.isPooled() && holder.isPoolPreparedStatements() && stmt.exceptionCount == 0) {
|
||||
holder.getStatementPool().put(stmt.getPreparedStatementHolder());
|
||||
|
||||
stmt.clearResultSet();
|
||||
|
||||
Reference in New Issue
Block a user