to issue<45245581>:remove spm baseline guard

This commit is contained in:
hanr881
2023-05-25 12:41:11 +00:00
committed by ob-robot
parent 85bc7d4d0e
commit e69feb29f3
3 changed files with 1 additions and 22 deletions

View File

@ -1859,7 +1859,6 @@ int ObPL::get_pl_function(ObExecContext &ctx,
ObPLFunction* routine = NULL;
OZ (ObPLContext::valid_execute_context(ctx));
if (OB_SUCC(ret)) {
ObPlanBaseKeyGuard guard(ctx.get_sql_ctx()->spm_ctx_.bl_key_);
uint64_t database_id = OB_INVALID_ID;
ctx.get_my_session()->get_database_id(database_id);
@ -1993,7 +1992,6 @@ int ObPL::get_pl_function(ObExecContext &ctx,
CK (OB_NOT_NULL(local_routine));
} else { // standalone routine
static const ObString PLSQL = ObString("PL/SQL");
ObPlanBaseKeyGuard guard(ctx.get_sql_ctx()->spm_ctx_.bl_key_);
uint64_t database_id = OB_INVALID_ID;
ctx.get_my_session()->get_database_id(database_id);

View File

@ -2800,8 +2800,7 @@ int ObSql::generate_physical_plan(ParseResult &parse_result,
ObStmtOraNeedPrivs stmt_ora_need_privs;
stmt_need_privs.need_privs_.set_allocator(&allocator);
stmt_ora_need_privs.need_privs_.set_allocator(&allocator);
// TODO: @linlin.xll remove ori_bl_key after eval_udf use identical sql ctx.
ObPlanBaseKeyGuard guard(sql_ctx.spm_ctx_.bl_key_);
_LOG_DEBUG("start to generate physical plan for query.(query = %.*s)",
parse_result.input_sql_len_, parse_result.input_sql_);
if (OB_FAIL(sanity_check(sql_ctx))) { //check sql_ctx.session_info_ and sql_ctx.schema_guard_

View File

@ -61,24 +61,6 @@ struct ObSqlCtx;
class ObResultSet;
class ObLogPlan;
class ObPlanBaseKeyGuard
{
public:
[[nodiscard]] explicit ObPlanBaseKeyGuard(ObBaselineKey &bl_key)
: bl_key_(bl_key),
ori_bl_key_(bl_key) {}
~ObPlanBaseKeyGuard()
{
bl_key_ = ori_bl_key_;
}
private:
// disallow copy
ObPlanBaseKeyGuard(const ObPlanBaseKeyGuard &other);
private:
ObBaselineKey &bl_key_;
ObBaselineKey ori_bl_key_;
};
// this class is the main interface for sql module
class ObSql
{