timeguard and tenant config opt (5/5)

This commit is contained in:
obdev
2023-03-02 18:49:10 +00:00
committed by ob-robot
parent b382879cb3
commit a65db0d0f8
19 changed files with 94 additions and 122 deletions

View File

@ -241,12 +241,8 @@ int ObUDRUtils::match_udr_and_refill_ctx(const ObString &pattern,
int ret = OB_SUCCESS;
is_match_udr = false;
ObSQLSessionInfo &session = result.get_session();
omt::ObTenantConfigGuard tenant_config(TENANT_CONF(session.get_effective_tenant_id()));
if (!tenant_config.is_valid()) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("tenant config is invalid", K(ret));
} else if (tenant_config->enable_user_defined_rewrite_rules
&& !(pc_ctx.is_inner_sql() || PC_PL_MODE == pc_ctx.mode_)) {
if (session.enable_user_defined_rewrite_rules()
&& !(pc_ctx.is_inner_sql() || PC_PL_MODE == pc_ctx.mode_)) {
ObIAllocator &allocator = result.get_mem_pool();
PatternConstConsList cst_cons_list;
if (OB_FAIL(match_udr_item(pattern, session, allocator, item_guard, &cst_cons_list))) {