[CP] fix: fix the plan generating bug induced by tracepoint

This commit is contained in:
obdev 2024-03-14 02:45:14 +00:00 committed by ob-robot
parent cff976601e
commit 126c1d5744

View File

@ -11577,9 +11577,9 @@ int ObJoinOrder::get_valid_path_info(const ObJoinOrder &left_tree,
if (OB_SUCC(ret)) {
bool force_use_nlj = false;
force_use_nlj = (OB_SUCCESS != (OB_E(EventTable::EN_GENERATE_PLAN_WITH_NLJ) OB_SUCCESS));
if (force_use_nlj) {
//if tracepoint is triggered and the local methiods contain NLJ, remove the merge-join paths to use nlj as possible
if (force_use_nlj && (path_info.local_methods_ & NESTED_LOOP_JOIN)) {
path_info.local_methods_ &= ~MERGE_JOIN;
path_info.local_methods_ |= NESTED_LOOP_JOIN;
}
}
//check batch update join type