mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed pooledStatementStat
This commit is contained in:
@@ -40,6 +40,7 @@ import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import com.alibaba.druid.proxy.jdbc.JdbcParameter.TYPE;
|
||||
import com.alibaba.druid.stat.JdbcSqlStat;
|
||||
|
||||
/**
|
||||
* @author wenshao<szujobs@hotmail.com>
|
||||
@@ -465,4 +466,13 @@ public class PreparedStatementProxyImpl extends StatementProxyImpl implements Pr
|
||||
|
||||
return super.unwrap(iface);
|
||||
}
|
||||
|
||||
public JdbcSqlStat getSqlStat() {
|
||||
if (sqlStat.isRemoved()) {
|
||||
JdbcSqlStat sqlStat = this.getConnectionProxy().getDirectDataSource().getDataSourceStat().getSqlStat(sql);
|
||||
sqlStat.setDbType(this.sqlStat.getDbType());
|
||||
this.sqlStat = sqlStat;
|
||||
}
|
||||
return sqlStat;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user