opensource bigfix patch

This commit is contained in:
obdev
2021-07-13 19:42:21 +08:00
committed by wangzelin.wzl
parent 2c4f8593fb
commit f27ecbb784
17 changed files with 124 additions and 52 deletions

View File

@ -1606,8 +1606,13 @@ int ObPlanCache::construct_plan_cache_key(ObPlanCacheCtx& plan_ctx, ObjNameSpace
int ObPlanCache::construct_plan_cache_key(ObSQLSessionInfo& session, ObjNameSpace ns, ObPlanCacheKey& pc_key)
{
int ret = OB_SUCCESS;
if (OB_FAIL(session.get_database_id(pc_key.db_id_))) {
uint64_t database_id = OB_INVALID_ID;
if (OB_FAIL(session.get_database_id(database_id))) {
LOG_WARN("get database id failed", K(ret));
} else if (FALSE_IT(pc_key.db_id_ = (database_id == OB_INVALID_ID) ?
OB_OUTLINE_DEFAULT_DATABASE_ID
: database_id)) {
// do nothing
} else {
pc_key.namespace_ = ns;
pc_key.sys_vars_str_ = session.get_sys_var_in_pc_str();