@@ -85,15 +85,11 @@ create or replace package body ut_suite_cache_manager is
8585
8686
8787 gc_get_bulk_cache_suite_sql constant varchar2(32767) :=
88- q'[with
89- suite_paths_tabs as (
90- select schema_name,object_name,procedure_name,suite_path
91- from table(:l_schema_paths)
92- ),
88+ q'[with
9389 suite_items as (
9490 select /*+ cardinality(c 500) */ value(c) as obj
9591 from ut_suite_cache c,
96- suite_paths_tabs sp
92+ table(:l_schema_paths) sp
9793 where c.object_owner = upper(sp.schema_name)
9894 and sp.suite_path is not null
9995 and (
@@ -108,7 +104,7 @@ create or replace package body ut_suite_cache_manager is
108104 union all
109105 select /*+ cardinality(c 500) */ value(c) as obj
110106 from ut_suite_cache c,
111- suite_paths_tabs sp
107+ table(:l_schema_paths) sp
112108 where c.object_owner = upper(sp.schema_name)
113109 and sp.suite_path is null
114110 and c.object_name like nvl(upper(replace(sp.object_name,'*','%')),c.object_name)
@@ -388,7 +384,11 @@ create or replace package body ut_suite_cache_manager is
388384 )
389385 select ut_path_item(schema_name,object_name,procedure_name,suite_path)
390386 bulk collect into l_schema_paths
391- from paths_to_expand;
387+ from
388+ (select schema_name,object_name,procedure_name,suite_path,
389+ row_number() over ( partition by schema_name,object_name,procedure_name,suite_path order by 1) r_num
390+ from paths_to_expand)
391+ where r_num = 1 ;
392392 return l_schema_paths;
393393 end;
394394
@@ -429,7 +429,7 @@ create or replace package body ut_suite_cache_manager is
429429
430430 execute immediate l_sql
431431 bulk collect into l_results
432- using l_schema_paths, l_include_tags, l_include_tags, l_exclude_tags, a_random_seed;
432+ using l_schema_paths, l_schema_paths, l_include_tags, l_include_tags, l_exclude_tags, a_random_seed;
433433 return l_results;
434434 end;
435435
0 commit comments