提交 7e3c4a6a 编写于 作者: S Serge Rider

Query execution statistics fix

上级 f5948506
......@@ -2376,7 +2376,7 @@ public class ResultSetViewer extends Viewer
}
}
model.setUpdateInProgress(false);
if (job.getStatistics() == null || job.getStatistics().getStatementsCount() > 0) {
if (job.getStatistics() == null || job.getStatistics().isEmpty()) {
if (error == null) {
// Update status (update execution statistics)
updateStatusMessage();
......
......@@ -111,6 +111,7 @@ public class DBCStatistics {
this.statementsCount++;
}
public String getQueryText() {
return queryText;
}
......@@ -148,7 +149,7 @@ public class DBCStatistics {
public boolean isEmpty()
{
return executeTime <= 0 && fetchTime <= 0;
return executeTime <= 0 && fetchTime <= 0 && statementsCount == 0;
}
public void accumulate(DBCStatistics stat)
......
......@@ -143,6 +143,7 @@ public abstract class ExecuteBatchImpl implements DBSDataManipulator.ExecuteBatc
if (statement == null || !reuse) {
statement = prepareStatement(session, rowValues);
statistics.setQueryText(statement.getQueryString());
statistics.addStatementsCount();
}
try {
bindStatement(handlers, statement, rowValues);
......
......@@ -150,6 +150,7 @@ public abstract class JDBCTable<DATASOURCE extends DBPDataSource, CONTAINER exte
String sqlQuery = query.toString();
statistics.setQueryText(sqlQuery);
statistics.addStatementsCount();
monitor.subTask(ModelMessages.model_jdbc_fetch_table_data);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册