[CP] fix bug of NO_GATHER_OPTIMIZER_STATISTICS no affect
This commit is contained in:
@ -95,8 +95,22 @@ int ObInsertLogPlan::generate_normal_raw_plan()
|
||||
LOG_WARN("failed to compute dml parallel", K(ret));
|
||||
} else if (use_pdml() && OB_FAIL(set_is_direct_insert())) {
|
||||
LOG_WARN("failed to set is direct insert", K(ret));
|
||||
} else if (!is_direct_insert() && OB_FAIL(check_need_online_stats_gather(need_osg))) {
|
||||
LOG_WARN("fail to check wether we need optimizer stats gathering operator", K(ret));
|
||||
}
|
||||
if (OB_SUCC(ret)) {
|
||||
bool tmp_need_osg = false;
|
||||
if (OB_FAIL(check_need_online_stats_gather(tmp_need_osg))) {
|
||||
LOG_WARN("fail to check wether we need optimizer stats gathering operator", K(ret));
|
||||
} else {
|
||||
if (is_direct_insert()) {
|
||||
get_optimizer_context().get_exec_ctx()->get_table_direct_insert_ctx()
|
||||
.set_is_online_gather_statistics(tmp_need_osg);
|
||||
} else {
|
||||
need_osg = tmp_need_osg;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (OB_FAIL(ret)) {
|
||||
//pass
|
||||
} else if (need_osg && OB_FAIL(generate_osg_share_info(osg_info))) {
|
||||
LOG_WARN("failed to generate osg share info");
|
||||
} else if (need_osg && OB_ISNULL(osg_info)) {
|
||||
|
||||
Reference in New Issue
Block a user