[BUGFIX] fix ObTextStringIter deconstruct after allocator

This commit is contained in:
obdev
2023-02-08 19:57:29 +08:00
committed by ob-robot
parent 4150a9de1d
commit eb6c0e1eac
9 changed files with 21 additions and 22 deletions

View File

@ -588,10 +588,10 @@ int ObExprOracleInstr::calc_oracle_instr_expr(const ObExpr &expr, ObEvalCtx &ctx
}
}
} else { // at least one of the inputs is text tc
ObTextStringIter haystack_iter(haystack_type, calc_cs_type, haystack->get_string(), haystack_has_lob_header);
ObTextStringIter needle_iter(needle_type, calc_cs_type, needle->get_string(), needle_has_lob_header);
ObEvalCtx::TempAllocGuard alloc_guard(ctx);
ObIAllocator &calc_alloc = alloc_guard.get_allocator();
ObTextStringIter haystack_iter(haystack_type, calc_cs_type, haystack->get_string(), haystack_has_lob_header);
ObTextStringIter needle_iter(needle_type, calc_cs_type, needle->get_string(), needle_has_lob_header);
if (OB_FAIL(calc_oracle_instr_text(haystack_iter, needle_iter,
calc_alloc, calc_cs_type, pos_int, occ_int, idx))) {