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

Skip to content

Commit 0d3da05

Browse files
authored
Merge branch 'develop' into feature/resolve_12_2_conditional_compilation
2 parents 54ff178 + 4f46c51 commit 0d3da05

7 files changed

Lines changed: 31 additions & 7 deletions

File tree

docs/userguide/install.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ sqlplus sys/sys_pass@db as sysdba @install_headless.sql utp3 my_verySecret_passw
8080

8181
The script needs to be executed by `SYSDBA`, in order to grant access to `DBMS_LOCK` and `DBMS_CRYPTO` system packages.
8282

83+
*Note:* Grant on `DBMS_LOCK` is required on Oracle versions below 18c
84+
8385

8486
# Recommended Schema
8587
It is highly recommended to install utPLSQL in it's own schema. You are free to choose any name for this schema.

source/check_object_grants.sql

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
declare
2-
c_expected_grants constant dbmsoutput_linesarray := dbmsoutput_linesarray('DBMS_LOCK','DBMS_CRYPTO');
3-
2+
$if dbms_db_version.version >= 18 $then
3+
c_expected_grants constant dbmsoutput_linesarray := dbmsoutput_linesarray('DBMS_CRYPTO');
4+
$else
5+
c_expected_grants constant dbmsoutput_linesarray := dbmsoutput_linesarray('DBMS_LOCK','DBMS_CRYPTO');
6+
$end
47
l_missing_grants varchar2(4000);
58
l_target_table varchar2(128);
69
l_owner_column varchar2(128);

source/core/output_buffers/ut_output_table_buffer.tpb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,11 @@ create or replace type body ut_output_table_buffer is
123123

124124
--nothing fetched from output, wait and try again
125125
if l_buffer_data.count = 0 then
126-
dbms_lock.sleep(l_sleep_time);
126+
$if dbms_db_version.version >= 18 $then
127+
dbms_session.sleep(l_sleep_time);
128+
$else
129+
dbms_lock.sleep(l_sleep_time);
130+
$end
127131
l_already_waited_for := l_already_waited_for + l_sleep_time;
128132
if l_already_waited_for > lc_long_wait_time then
129133
l_sleep_time := lc_long_sleep_time;

source/core/ut_utils.pks

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ create or replace package ut_utils authid definer is
2121
*
2222
*/
2323

24-
gc_version constant varchar2(50) := 'v3.1.4.2503-develop';
24+
gc_version constant varchar2(50) := 'v3.1.4.2508-develop';
2525

2626
/* Constants: Event names */
2727
subtype t_event_name is varchar2(30);

source/create_utplsql_owner.sql

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,14 @@ create user &ut3_user identified by "&ut3_password" default tablespace &ut3_tabl
3131

3232
grant create session, create sequence, create procedure, create type, create table, create view, create synonym to &ut3_user;
3333

34-
grant execute on dbms_lock to &ut3_user;
34+
begin
35+
$if dbms_db_version.version < 18 $then
36+
execute immediate 'grant execute on dbms_lock to &ut3_user';
37+
$else
38+
null;
39+
$end
40+
end;
41+
/
3542

3643
grant execute on dbms_crypto to &ut3_user;
3744

test/core/annotations/test_annotation_manager.pkb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,11 @@ create or replace package body test_annotation_manager is
124124
ut3.ut_annotation_manager.rebuild_annotation_cache(user,'PACKAGE');
125125
recompile_dummy_package();
126126
l_start_date := sysdate;
127-
dbms_lock.sleep(1);
127+
$if dbms_db_version.version >= 18 $then
128+
dbms_session.sleep(1);
129+
$else
130+
dbms_lock.sleep(1);
131+
$end
128132
--Act
129133
ut3.ut_annotation_manager.rebuild_annotation_cache(user,'PACKAGE');
130134
--Assert

test/core/test_ut_executable.pkb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,11 @@ create or replace package body test_ut_executable is
7070
auto_drop => TRUE,
7171
comments => 'one-time job'
7272
);
73-
dbms_lock.sleep(0.4);
73+
$if dbms_db_version.version >= 18 $then
74+
dbms_session.sleep(0.4);
75+
$else
76+
dbms_lock.sleep(0.4);
77+
$end
7478
while l_cnt > 0 loop
7579
select count(1) into l_cnt
7680
from dba_scheduler_running_jobs srj

0 commit comments

Comments
 (0)