bug fixed for Statement.clearParameter

This commit is contained in:
wenshao
2012-12-24 17:32:20 +08:00
parent ac2ede0f4d
commit 0ffda4f76f
@@ -137,10 +137,12 @@ public class DruidPooledConnection extends PoolableWrapper implements javax.sql.
public void closePoolableStatement(DruidPooledPreparedStatement stmt) throws SQLException {
PreparedStatement rawStatement = stmt.getRawPreparedStatement();
try {
rawStatement.clearParameters();
} catch (SQLException ex) {
LOG.error("clear parameter error", ex);
if (holder.isPoolPreparedStatements()) {
try {
rawStatement.clearParameters();
} catch (SQLException ex) {
LOG.error("clear parameter error", ex);
}
}
if (holder == null) {