fix gather truncate longtext string bug and write opt stats gather history bug
This commit is contained in:
@ -107,20 +107,14 @@ int ObAnalyzeExecutor::execute(ObExecContext &ctx, ObAnalyzeStmt &stmt)
|
||||
LOG_TRACE("succeed to gather table stats", K(param));
|
||||
}
|
||||
running_monitor.set_monitor_result(ret, ObTimeUtility::current_time(), param.allocator_->used());
|
||||
sql::ObSQLSessionInfo *origin_session = THIS_WORKER.get_session();
|
||||
THIS_WORKER.set_session(NULL);
|
||||
ObOptStatManager::get_instance().update_opt_stat_gather_stat(gather_stat);
|
||||
THIS_WORKER.set_session(origin_session);
|
||||
pl::ObDbmsStats::update_optimizer_gather_stat_info(NULL, &gather_stat);
|
||||
ObOptStatGatherStatList::instance().remove(gather_stat);
|
||||
task_info.completed_table_count_ ++;
|
||||
}
|
||||
task_info.task_end_time_ = ObTimeUtility::current_time();
|
||||
task_info.ret_code_ = ret;
|
||||
task_info.failed_count_ = ret == OB_SUCCESS ? 0 : params.count() - i + 1;
|
||||
sql::ObSQLSessionInfo *origin_session = THIS_WORKER.get_session();
|
||||
THIS_WORKER.set_session(NULL);
|
||||
ObOptStatManager::get_instance().update_opt_stat_task_stat(task_info);
|
||||
THIS_WORKER.set_session(origin_session);
|
||||
pl::ObDbmsStats::update_optimizer_gather_stat_info(&task_info, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user