[FEAT MERGE] Solidify session vars for functional index

This commit is contained in:
obdev
2024-02-07 16:44:49 +00:00
committed by ob-robot
parent aceabf03d5
commit c699ceea48
189 changed files with 3671 additions and 1554 deletions

View File

@ -188,6 +188,7 @@ ObSqlCtx::ObSqlCtx()
all_expr_constraints_(nullptr),
all_priv_constraints_(nullptr),
need_match_all_params_(false),
all_local_session_vars_(nullptr),
is_ddl_from_primary_(false),
cur_stmt_(NULL),
cur_plan_(nullptr),
@ -239,6 +240,7 @@ void ObSqlCtx::reset()
all_expr_constraints_ = nullptr;
all_priv_constraints_ = nullptr;
need_match_all_params_ = false;
all_local_session_vars_ = nullptr;
is_ddl_from_primary_ = false;
can_reroute_sql_ = false;
is_sensitive_ = false;
@ -733,5 +735,20 @@ int ObSqlCtx::set_multi_stmt_rowkey_pos(const common::ObIArray<int64_t> &multi_s
return ret;
}
int ObQueryCtx::add_local_session_vars(ObIAllocator *alloc, const ObLocalSessionVar &local_session_var, int64_t &idx) {
int ret = OB_SUCCESS;
if (OB_FAIL(all_local_session_vars_.push_back(ObLocalSessionVar()))) {
LOG_WARN("push back local session var failed", K(ret));
} else {
idx = all_local_session_vars_.count() - 1;
ObLocalSessionVar &local_var = all_local_session_vars_.at(idx);
local_var.set_allocator(alloc);
if (OB_FAIL(local_var.deep_copy(local_session_var))) {
LOG_WARN("deep copy local session var failed", K(ret));
}
}
return ret;
}
}
}