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

Skip to content

Fixes to DDL Trigger annotation parsing on 11g #1093

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions source/core/annotations/ut_annotation_manager.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ create or replace package body ut_annotation_manager as
-- remove the "create [or replace] [[non]editionable] " so that we have only "type|package" for parsing
-- needed for dbms_preprocessor
l_sql_clob := regexp_replace(l_sql_clob, '^(.*?\s*create(\s+or\s+replace)?(\s+(editionable|noneditionable))?\s+?)((package|type).*)', '\5', 1, 1, 'ni');
-- remove "OWNER." from create or replace statement.
-- Owner is not supported along with AUTHID - see issue https://github.com/utPLSQL/utPLSQL/issues/1088
l_sql_clob := regexp_replace(l_sql_clob, '^(package|type)\s+("?[a-zA-Z][a-zA-Z0-9#_$]*"?\.)(.*)', '\1 \3', 1, 1, 'ni');
l_sql_lines := ut_utils.convert_collection( ut_utils.clob_to_table(l_sql_clob) );
end if;
open l_result for
Expand Down
6 changes: 3 additions & 3 deletions test/ut3_tester_helper/annotation_cache_helper.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ create or replace package body annotation_cache_helper as
pragma autonomous_transaction;
begin
execute immediate
'create or replace package ut3_cache_test_owner.granted_test_suite is
'create or replace package ut3_cache_test_owner.granted_test_suite authid definer is
--%suite

--%test
Expand All @@ -19,7 +19,7 @@ create or replace package body annotation_cache_helper as
procedure test2 is begin ut3_develop.ut.expect( 1 ).to_equal( 1 ); end;
end;';
execute immediate
'create or replace package ut3_cache_test_owner.not_granted_test_suite is
'create or replace package ut3_cache_test_owner.not_granted_test_suite authid definer is
--%suite

--%test
Expand Down Expand Up @@ -54,7 +54,7 @@ create or replace package body annotation_cache_helper as
pragma autonomous_transaction;
begin
execute immediate
'create or replace package ut3_cache_test_owner.new_suite is
'create or replace package ut3_cache_test_owner.new_suite authid definer is
--%suite

--%test
Expand Down