Skip to content

Commit 5511387

Browse files
authored
Merge pull request #946 from utPLSQL/release/v3.1.7
Release/v3.1.7
2 parents e3f5f95 + 46aa443 commit 5511387

File tree

435 files changed

+13055
-6411
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

435 files changed

+13055
-6411
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ env:
2525
- UT3_USER_PASSWORD=ut3
2626
- UT3_TESTER=ut3_tester
2727
- UT3_TESTER_PASSWORD=ut3
28+
- UT3_TESTER_HELPER=ut3_tester_helper
29+
- UT3_TESTER_HELPER_PASSWORD=ut3
2830
- UT3_TABLESPACE=users
2931
# Environment for building a release
3032
- CURRENT_BRANCH=${TRAVIS_BRANCH}
@@ -45,7 +47,7 @@ env:
4547
#utPLSQL released version directory
4648
- UTPLSQL_DIR="utPLSQL_latest_release"
4749
- SELFTESTING_BRANCH=${TRAVIS_BRANCH}
48-
- UTPLSQL_CLI_VERSION="3.1.0"
50+
- UTPLSQL_CLI_VERSION="3.1.6"
4951
# Maven
5052
- MAVEN_HOME=/usr/local/maven
5153
- MAVEN_CFG=$HOME/.m2
@@ -54,6 +56,7 @@ env:
5456
- ORACLE_VERSION="${DOCKER_TAG_12C:-12c-r1-se2-small}" CONNECTION_STR='127.0.0.1:1521/ORCLCDB' DOCKER_OPTIONS="-v /dev/pdbs:/opt/oracle/oradata/pdbs"
5557
- ORACLE_VERSION="${DOCKER_TAG_12C2:-12c-r2-se2-small}" CONNECTION_STR='127.0.0.1:1521/ORCLCDB' DOCKER_OPTIONS="-v /dev/pdbs:/opt/oracle/oradata/pdbs"
5658
- ORACLE_VERSION="${DOCKER_TAG_18:-18c-se2-small}" CONNECTION_STR='127.0.0.1:1521/ORCLCDB' DOCKER_OPTIONS="-v /dev/pdbs:/opt/oracle/oradata/pdbs"
59+
- ORACLE_VERSION="${DOCKER_TAG_19:-19c-se2-small}" CONNECTION_STR='127.0.0.1:1521/ORCLCDB' DOCKER_OPTIONS="-v /dev/pdbs:/opt/oracle/oradata/pdbs"
5760

5861
cache:
5962
pip: true

.travis/install.sh

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ set verify off
1010
1111
--alter session set plsql_warnings = 'ENABLE:ALL', 'DISABLE:(5004,5018,6000,6001,6003,6009,6010,7206)';
1212
alter session set plsql_optimize_level=0;
13-
@install_headless.sql $UT3_OWNER $UT3_OWNER_PASSWORD
13+
@install_headless_with_trigger.sql $UT3_OWNER $UT3_OWNER_PASSWORD
1414
SQL
1515

1616
#Run this step only on second child job (12.1 - at it's fastest)
@@ -25,14 +25,18 @@ if [[ "${TRAVIS_JOB_NUMBER}" =~ \.2$ ]]; then
2525
set verify off
2626
2727
@uninstall_all.sql $UT3_OWNER
28+
whenever sqlerror exit failure rollback
2829
declare
2930
v_leftover_objects_count integer;
3031
begin
3132
select sum(cnt)
3233
into v_leftover_objects_count
33-
from (select count(1) cnt from dba_objects where owner = '$UT3_OWNER'
34-
union all
35-
select count(1) cnt from dba_synonyms where table_owner = '$UT3_OWNER'
34+
from (
35+
select count(1) cnt from dba_objects where owner = '$UT3_OWNER'
36+
where object_name not like 'PLSQL_PROFILER%' and object_name not like 'DBMSPCC_%'
37+
union all
38+
select count(1) cnt from dba_synonyms where table_owner = '$UT3_OWNER'
39+
where table_name not like 'PLSQL_PROFILER%' and table_name not like 'DBMSPCC_%'
3640
);
3741
if v_leftover_objects_count > 0 then
3842
raise_application_error(-20000, 'Not all objects were successfully uninstalled - leftover objects count='||v_leftover_objects_count);
@@ -47,6 +51,8 @@ SQL
4751
4852
alter session set plsql_optimize_level=0;
4953
@install.sql $UT3_OWNER
54+
@install_ddl_trigger.sql $UT3_OWNER
55+
@create_synonyms_and_grants_for_public.sql $UT3_OWNER
5056
SQL
5157

5258
fi
@@ -60,27 +66,37 @@ grant select any dictionary to $UT3_OWNER;
6066
grant create any procedure, drop any procedure, execute any procedure to $UT3_OWNER;
6167
SQL
6268

63-
#Create user that will own the tests
69+
#Create user that will own the tests that are relevant to internal framework
6470
time "$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<-SQL
6571
set feedback off
6672
@create_utplsql_owner.sql $UT3_TESTER $UT3_TESTER_PASSWORD $UT3_TABLESPACE
67-
68-
--needed for testing distributed transactions
69-
grant create public database link to $UT3_TESTER;
70-
grant drop public database link to $UT3_TESTER;
71-
set feedback on
72-
--Needed for testing coverage outside of main UT3 schema.
73-
grant create any procedure, drop any procedure, execute any procedure, create any type, drop any type, execute any type, under any type, select any table, update any table, insert any table, delete any table, create any table, drop any table, alter any table, select any dictionary to $UT3_TESTER;
74-
revoke execute on dbms_crypto from $UT3_TESTER;
75-
grant create job to $UT3_TESTER;
73+
--needed for disabling DDL trigger and testint parser without trigger enabled/present
74+
grant alter any trigger to ut3_tester;
75+
grant administer database trigger to $UT3_TESTER;
7676
exit
7777
SQL
7878

79-
#Create additional UT3$USER# to test for special characters
79+
#Create additional UT3$USER# to test for special characters and front end API testing
8080
time "$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<-SQL
8181
set feedback off
8282
@create_utplsql_owner.sql $UT3_USER $UT3_USER_PASSWORD $UT3_TABLESPACE
83-
--Grant UT3 framework to UT3$USER#
83+
--Grant UT3 framework to min user
8484
@create_user_grants.sql $UT3_OWNER $UT3_USER
8585
exit
8686
SQL
87+
88+
#Create additional UT3_TESTER_HELPER that will provide a functions to allow min grant test user setup test
89+
time "$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<-SQL
90+
set feedback off
91+
@create_utplsql_owner.sql $UT3_TESTER_HELPER $UT3_TESTER_HELPER_PASSWORD $UT3_TABLESPACE
92+
--needed for testing distributed transactions
93+
grant create public database link to $UT3_TESTER_HELPER;
94+
grant drop public database link to $UT3_TESTER_HELPER;
95+
set feedback on
96+
--Needed for testing coverage outside of main UT3 schema.
97+
grant create any procedure, drop any procedure, execute any procedure, create any type, drop any type, execute any type, under any type, select any table, update any table, insert any table, delete any table, create any table, drop any table, alter any table, select any dictionary, create any synonym, drop any synonym to $UT3_TESTER_HELPER;
98+
grant create job to $UT3_TESTER_HELPER;
99+
--Needed to allow for enable/disable of annotation triggers
100+
grant administer database trigger to $UT3_TESTER_HELPER;
101+
exit
102+
SQL

.travis/install_utplsql_release.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,14 @@ end;
3636
/
3737
SQL
3838

39+
INSTALL_FILE="install_headless_with_trigger.sql"
40+
if [[ ! -f "${INSTALL_FILE}" ]]; then
41+
INSTALL_FILE="install_headless.sql"
42+
fi
43+
3944
"$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<SQL
4045
alter session set plsql_optimize_level=0;
41-
@install_headless.sql ${UT3_RELEASE_VERSION_SCHEMA}
46+
@${INSTALL_FILE} ${UT3_RELEASE_VERSION_SCHEMA}
4247
exit
4348
SQL
4449

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187
same "printed page" as the copyright notice for easier
188188
identification within third-party archives.
189189

190-
Copyright 2016 utPLSQL Project
190+
Copyright 2016 - 2019 utPLSQL Project
191191

192192
Licensed under the Apache License, Version 2.0 (the "License"):
193193
you may not use this file except in compliance with the License.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v3.1.6
1+
v3.1.7

development/cleanup.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,17 @@ end;
2121
drop user ${UT3_OWNER} cascade;
2222
drop user ${UT3_RELEASE_VERSION_SCHEMA} cascade;
2323
drop user ${UT3_TESTER} cascade;
24+
drop user ${UT3_TESTER_HELPER} cascade;
2425
drop user ${UT3_USER} cascade;
2526
2627
begin
2728
for i in (
28-
select decode(owner,'PUBLIC','drop public synonym "','drop synonym "'||owner||'"."')|| synonym_name ||'"' drop_orphaned_synonym from dba_synonyms a
29+
select decode(owner,'PUBLIC','drop public synonym "','drop synonym "'||owner||'"."')|| synonym_name ||'"' drop_orphaned_synonym, owner||'.'||synonym_name syn from dba_synonyms a
2930
where not exists (select 1 from dba_objects b where (a.table_name=b.object_name and a.table_owner=b.owner or b.owner='SYS' and a.table_owner=b.object_name) )
3031
and a.table_owner not in ('SYS','SYSTEM')
3132
) loop
32-
dbms_output.put_line(i.drop_orphaned_synonym);
3333
execute immediate i.drop_orphaned_synonym;
34+
dbms_output.put_line('synonym '||i.syn||' dropped');
3435
end loop;
3536
end;
3637
/

development/releasing.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,20 @@ To create a release:
77
- create release branch from development branch and make sure to name the release branch: `release/vX.Y.Z`
88
- update, commit and push at least one file change in the release branch, to kickoff a Travis build
99
- wait for th build to complete successfully
10-
- merge the release branch to master and wait for master build to complete successfully
11-
- create a release from the master branch using [github releases page](https://github.com/utPLSQL/utPLSQL/releases) and populate release description using information found on the issues and pull requests since previous release.
10+
- merge the release branch to master and wait for master build to complete successfully (do not use Squash/rebase for merge operation)
11+
- create a Github release from the master branch using [github releases page](https://github.com/utPLSQL/utPLSQL/releases) and populate release description using information found on the issues and pull requests since previous release.
1212
To find issues closed after certain date use [advanced filters](https://help.github.com/articles/searching-issues-and-pull-requests/#search-by-open-or-closed-state).
1313
Example: [`is:issue closed:>2018-07-22`](https://github.com/utPLSQL/utPLSQL/issues?utf8=%E2%9C%93&q=is%3Aissue+closed%3A%3E2018-07-22+)
14-
- After release was successfully built, merge master branch back into develop branch
14+
- After A build was completed on a TAG (github release) was successful, merge master branch back into develop branch.
15+
- At this point, master branch and release tag should be at the same commit version and artifacts should be uploaded into Github release.
1516
- After develop branch was built, update version number in `VERSION` file to represent next planned release version.
1617
- Clone `utplsql.githug.io` project and add a new announcement about next version being released in `_posts`. Use previous announcements as a template. Make sure to set date, time and post title properly.
1718

1819
The following will happen:
1920
- build executed on branch `release/vX.Y.Z-[something]` updates files `sonar-project.properties`, `VERSION` with project version derived from the release branch name
2021
- changes to those two files are committed and pushed back to release branch by Travis
21-
- when a release is created, a new tag is added in on the repository and a tag build is executed
22+
- builds on master branch are **not getting executed**
23+
- when a Github release is created, a new tag is added in on the repository and a tag build is executed
2224
- the documentation for new release is published on `utplsql.github.io` and installation archives are added to the tag.
2325

2426
Note:

development/template.env.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export SQLCLI=sql # For sqlcl client
44
#export SQLCLI=sqlplus # For sqlplus client
55
export CONNECTION_STR=127.0.0.1:1521/xe # Adjust the connect string
66
export ORACLE_PWD=oracle # Adjust your local SYS password
7-
export UTPLSQL_CLI_VERSION="3.1.0"
7+
export UTPLSQL_CLI_VERSION="3.1.6"
88
export SELFTESTING_BRANCH=develop
99

1010
export UTPLSQL_DIR="utPLSQL_latest_release"
@@ -13,7 +13,8 @@ export UT3_OWNER_PASSWORD=ut3
1313
export UT3_RELEASE_VERSION_SCHEMA=ut3_latest_release
1414
export UT3_TESTER=ut3_tester
1515
export UT3_TESTER_PASSWORD=ut3
16+
export UT3_TESTER_HELPER=ut3_tester_helper
17+
export UT3_TESTER_HELPER_PASSWORD=ut3
1618
export UT3_TABLESPACE=users
1719
export UT3_USER="UT3\$USER#"
1820
export UT3_USER_PASSWORD=ut3
19-

development/utplsql_style_check.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ select i.name, i.type, i.object_name, i.object_type, i.usage, i.line, i.col, cou
4040
and i.usage_context_id = p.usage_id
4141
where i.type like 'VARIABLE' and i.usage = 'DECLARATION'
4242
and i.object_type not in ('TYPE')
43-
and (i.name not like 'L#_%' escape '#' and p.type in ('PROCEDURE','FUNCTION','ITERATOR')
44-
or i.name not like 'G#_%' escape '#' and p.type not in ('PROCEDURE','FUNCTION','ITERATOR'))
43+
and (i.name not like 'L#_%' escape '#' and p.type in ('PROCEDURE','FUNCTION','ITERATOR','TRIGGER')
44+
or i.name not like 'G#_%' escape '#' and p.type not in ('PROCEDURE','FUNCTION','ITERATOR','TRIGGER'))
4545
and p.type != 'RECORD'
4646
order by object_name, object_type, line, col
4747
;

docs/about/authors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![version](https://img.shields.io/badge/version-v3.1.6.2729-blue.svg)
1+
![version](https://img.shields.io/badge/version-v3.1.7.3085-blue.svg)
22

33
### utPLSQL v3 Major Contributors
44

0 commit comments

Comments
 (0)