modify large stack variable to heap variable for pwj compare

This commit is contained in:
yb0
2022-02-16 19:22:12 +08:00
committed by LINxiansheng
parent b79cea0cad
commit a3fa322bc9

View File

@ -593,8 +593,10 @@ int ObDistPlans::check_inner_constraints(const ObIArray<ObPlanPwjConstraint>& st
if (strict_cons.count() > 0 || non_strict_cons.count() > 0) {
const int64_t tbl_count = phy_tbl_infos.count();
ObSEArray<PwjTable, 8> pwj_tables;
ObPwjComparer strict_pwj_comparer(true);
ObPwjComparer non_strict_pwj_comparer(false);
HEAP_VAR(ObPwjComparer, strict_pwj_comparer, true)
{
HEAP_VAR(ObPwjComparer, non_strict_pwj_comparer, false)
{
if (OB_FAIL(pwj_tables.prepare_allocate(tbl_count))) {
LOG_WARN("failed to prepare allocate pwj tables", K(ret));
}
@ -622,8 +624,8 @@ int ObDistPlans::check_inner_constraints(const ObIArray<ObPlanPwjConstraint>& st
ret = OB_ERR_UNEXPECTED;
LOG_WARN("get unexpected pwj constraint", K(ret), K(pwj_cons));
} else if (pwj_cons.at(0) == i) {
if (OB_FAIL(
check_pwj_cons(pc_ctx, pwj_cons, phy_tbl_infos, pwj_tables, strict_pwj_comparer, pwj_map, is_same))) {
if (OB_FAIL(check_pwj_cons(
pc_ctx, pwj_cons, phy_tbl_infos, pwj_tables, strict_pwj_comparer, pwj_map, is_same))) {
LOG_WARN("failed to check pwj cons", K(ret));
}
}
@ -643,6 +645,8 @@ int ObDistPlans::check_inner_constraints(const ObIArray<ObPlanPwjConstraint>& st
}
}
}
}
}
if (OB_FAIL(ret)) {
is_same = false;
}