From 0e573f70db47b5f790e5a5b98b663b92261a2e4c Mon Sep 17 00:00:00 2001 From: hanr881 <1741282579@qq.com> Date: Tue, 4 Jul 2023 03:48:13 +0000 Subject: [PATCH] to req<50664381>:fix synonym object match issue --- src/pl/pl_cache/ob_pl_cache.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/pl/pl_cache/ob_pl_cache.cpp b/src/pl/pl_cache/ob_pl_cache.cpp index a531235f0..6dc039dba 100644 --- a/src/pl/pl_cache/ob_pl_cache.cpp +++ b/src/pl/pl_cache/ob_pl_cache.cpp @@ -404,12 +404,20 @@ int ObPLObjectValue::get_all_dep_schema(ObPLCacheCtx &pc_ctx, pcv_schema->schema_id_, table_schema))) { LOG_WARN("failed to get table schema", K(pcv_schema->schema_id_), K(ret)); } else { /* do nothing */ } - } else if (OB_FAIL(schema_guard.get_simple_table_schema(tenant_id, //otherwise, use db id in session and table name search schema + } else if (OB_FAIL(schema_guard.get_simple_table_schema(tenant_id, database_id, pcv_schema->table_name_, false, table_schema))) { LOG_WARN("failed to get table schema", K(pcv_schema->schema_id_), K(ret)); + } else if (nullptr == table_schema && OB_FAIL(schema_guard.get_simple_table_schema(tenant_id, + pcv_schema->database_id_, + pcv_schema->table_name_, + false, + table_schema))) { + LOG_WARN("failed to get table schema", + K(ret), K(pcv_schema->tenant_id_), K(pcv_schema->database_id_), + K(pcv_schema->table_name_)); } else if (nullptr == table_schema && OB_FAIL(schema_guard.get_simple_table_schema(tenant_id, common::OB_ORA_SYS_DATABASE_ID, pcv_schema->table_name_,