Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7d6e1b1

Browse files
committed
Fixed bad implementation.
Added removal of SYS-created objects to allow for schema re-create when using develop branch for release.
1 parent df4ac90 commit 7d6e1b1

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

development/cleanup.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ git rev-parse && cd "$(git rev-parse --show-cdup)"
77

88
"${SQLCLI}" sys/${ORACLE_PWD}@//${CONNECTION_STR} AS SYSDBA <<-SQL
99
set echo on
10+
begin
11+
for x in (
12+
select * from dba_objects
13+
where owner in ( upper('${UT3_RELEASE_VERSION_SCHEMA}'), upper('${UT3_OWNER}') )
14+
and object_name like 'SYS_PLSQL%')
15+
loop
16+
execute immediate 'drop type '||x.owner||'.'||x.object_name||' force';
17+
end loop;
18+
end;
19+
/
20+
1021
drop user ${UT3_OWNER} cascade;
1122
drop user ${UT3_RELEASE_VERSION_SCHEMA} cascade;
1223
drop user ${UT3_TESTER} cascade;

source/core/annotations/ut_annotation_cache_manager.pkb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,17 +109,17 @@ create or replace package body ut_annotation_cache_manager as
109109
pragma autonomous_transaction;
110110
begin
111111
if a_object_owner is null and a_object_type is null then
112+
l_cache_filter := ':a_object_owner is null and :a_object_type is null';
113+
l_filter := l_cache_filter;
114+
else
112115
l_filter :=
113-
case when a_object_owner is null then ':a_object_owner is null' else 'object_owner = :a_object_owner' end || '
116+
case when a_object_owner is null then ':a_object_owner is null' else 'object_owner = :a_object_owner' end || '
114117
and '||case when a_object_type is null then ':a_object_type is null' else 'object_type = :a_object_type' end;
115118
l_cache_filter := ' c.cache_id
116119
in (select i.cache_id
117120
from ut_annotation_cache_info i
118121
where '|| l_filter || '
119122
)';
120-
else
121-
l_cache_filter := ':a_object_owner is null and :a_object_type is null';
122-
l_filter := l_cache_filter;
123123
end if;
124124
execute immediate '
125125
delete from ut_annotation_cache c

0 commit comments

Comments
 (0)