Skip to content

Commit 5554f7a

Browse files
authored
24.2.17 (#43)
* Rule "List Entry Does Not Contain &ITEM. Syntax" - wrong component_id #42 * [GAT-467] - product/sert/post_install/9001_check_invalids.sql throws error when using sqlcl24.1 [GAT-468] - DB 19.2x Error on installing product/sert/post_install/9001_check_invalids.sql SERT_CORE.EXCEPTIONS_API #40
1 parent 9fe6caa commit 5554f7a

10 files changed

+120
-7
lines changed

doc/release_notes.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
# Release Notes
2+
3+
## 24.2.17
4+
5+
* [GAT-466] - Rule "List Entry Does Not Contain &ITEM. Syntax" - wrong component_id #42
6+
* [GAT-467] - product/sert/post_install/9001_check_invalids.sql throws error when using sqlcl24.1
7+
* [GAT-468] - DB 19.2x Error on installing product/sert/post_install/9001_check_invalids.sql SERT_CORE.EXCEPTIONS_API #40
8+
29
## 24.2.16
310

411
* [GAT-465] - EVAL_RESULTS_EXC_PUB_V will not compile with ANSI join on PDB 19.27 #38

product/sert/post_install/01_recompile_schemas.sql

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,39 @@
66
--------------------------------------------------------------------------------
77
--changeset mipotter:compile_schemas stripComments:false runOnChange:true runAlways:true endDelimiter:/ rollbackEndDelimiter:/
88

9+
declare
10+
v_sql varchar2(1024);
911
begin
1012
sys.dbms_utility.compile_schema(schema => 'SERT_CORE', compile_all => false);
1113
sys.dbms_utility.compile_schema(schema => 'SERT_PUB', compile_all => false);
14+
15+
-- in 19.28 ADB and 19.27 PDB we are seeing one package (exceptions_api)
16+
-- remain invalid, direct compilation then succeeds. this is a generic
17+
-- workaround to attempt a explicit compile
18+
19+
-- Loop through all invalid packages and package bodies in the SERT_CORE schema
20+
for cur_rec in (
21+
-- Query dba_objects to find invalid packages and package bodies
22+
select object_name, object_type
23+
from dba_objects
24+
where owner = 'SERT_CORE'
25+
and status = 'INVALID'
26+
and object_type in ('PACKAGE', 'PACKAGE BODY')
27+
) loop
28+
if cur_rec.object_type = 'PACKAGE' then
29+
v_sql := 'alter package SERT_CORE.' || cur_rec.object_name || ' compile';
30+
else
31+
v_sql := 'alter package SERT_CORE.' || cur_rec.object_name || ' compile body';
32+
end if;
33+
34+
-- Attempt to recompile the object
35+
begin
36+
execute immediate v_sql;
37+
exception
38+
-- Catch any exceptions that occur during recompilation
39+
when others then
40+
raise;
41+
end;
42+
end loop;
1243
end;
1344
/
File renamed without changes.

product/sert/post_install/9001_check_invalids.sql renamed to product/sert/post_install/9001_check_invalids.sql.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44
-- Licensed under the Universal Permissive License v 1.0 as shown
55
-- at https://oss.oracle.com/licenses/upl/
66
--------------------------------------------------------------------------------
7-
--changeset mipotter:9001_check_invalids_1750135149958 endDelimiter:; runOnChange:true runAlways:true rollbackEndDelimiter:; stripComments:false
7+
--
8+
-- This script will only work for SQLCL 25+
9+
-- SQLCL 24.2 and lower will raise liquibase errors due to set command and raise command
10+
--
11+
--------------------------------------------------------------------------------
12+
13+
--changeset mipotter:9001_check_invalids_xml endDelimiter:; runOnChange:true runAlways:true rollbackEndDelimiter:; stripComments:false
814
--preconditions onFail:MARK_RAN onError:HALT
915
--precondition-sql-check expectedResult:1 select case when count(status) > 0 then 1 else 0 end as mycount from dba_objects where owner in ('SERT_CORE','SERT_PUB') and status = 'INVALID';
1016
set serveroutput on
@@ -35,6 +41,6 @@ where owner in ('SERT_CORE','SERT_PUB')
3541
order by owner, type, name, sequence;
3642

3743
-- now raise an error!
38-
exec RAISE_APPLICATION_ERROR (-20001, 'Errors found after compiling SERT schemas!');
44+
exec RAISE_APPLICATION_ERROR (-20001, '**** Errors found after compiling SERT schemas!');
3945

4046
--rollback not required
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<databaseChangeLog
3+
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xmlns:ora="http://www.oracle.com/xml/ns/dbchangelog-ext"
6+
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd"
7+
>
8+
<changeSet
9+
id="invalid_objects_check"
10+
author="jlyle"
11+
runOnChange="true"
12+
runAlways="true"
13+
>
14+
<preConditions onFail="MARK_RAN" onError="HALT">
15+
<sqlCheck expectedResult="1">
16+
select case when count(status) > 0 then 1 else 0 end as mycount from dba_objects where owner in ('SERT_CORE','SERT_PUB') and status = 'INVALID';
17+
</sqlCheck>
18+
</preConditions>
19+
<rollback></rollback>
20+
<ora:runOracleScript ownerName="jlyle" sourceType="STRING" objectType="SCRIPT" objectName="invalid_objects_check">
21+
<ora:source>
22+
set pagesize 50000
23+
prompt "********************************************************************************"
24+
prompt "** Invalid Objects"
25+
prompt "********************************************************************************"
26+
select /*ansiconsole*/
27+
owner||'.'||object_name invalid_object
28+
,object_type
29+
from dba_objects
30+
where status = 'INVALID'
31+
and owner in ('SERT_CORE','SERT_PUB');
32+
33+
prompt "********************************************************************************"
34+
prompt "** Object Errors"
35+
prompt "********************************************************************************"
36+
select /*ansiconsole*/
37+
owner||'.'||name invalid_object
38+
,type
39+
,sequence
40+
,line
41+
,position
42+
,nvl(regexp_substr(regexp_replace(text, '^PL/SQL: '), '^(ORA|PLS|PLW)'), 'PLS') message_type
43+
,regexp_replace(regexp_replace(text, '^PL/SQL: '), '(ORA|PLS|PLW)-[0-9]+: ') text
44+
from dba_errors
45+
where owner in ('SERT_CORE','SERT_PUB')
46+
order by owner, type, name, sequence;
47+
</ora:source>
48+
</ora:runOracleScript>
49+
<stop>*** ERROR Invalid objects exist in schema ***</stop>
50+
</changeSet>
51+
</databaseChangeLog>

product/sert/sert_core/package_body/data_api.pkb.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
--liquibase formatted sql
2+
-------------------------------------------------------------------------------
3+
-- Copyright (c) 2024,2025 Oracle and/or its affiliates.
4+
-- Licensed under the Universal Permissive License v 1.0 as shown
5+
-- at https://oss.oracle.com/licenses/upl/
6+
--------------------------------------------------------------------------------
27
--changeset mlancast:data_api_create_body stripComments:false endDelimiter:/ runOnChange:true
38
create or replace package body sert_core.data_api as
49

product/sert/sert_core/seed_data/055_prefs_internal_merge.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ begin
6161
merge into sert_core.prefs dst
6262
using ( select 'Release Version' as pref_name
6363
, 'RELEASE_VERSION' as pref_key
64-
, '24.2.16' as pref_value
64+
, '24.2.17' as pref_value
6565
, 'Y' as internal_yn from dual ) src
6666
on ( src.pref_key = dst.pref_key)
6767
when matched then

product/sert/sert_core/seed_data/110_rule_import.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5615,10 +5615,10 @@ begin
56155615
p_view_name => 'APEX_APPLICATION_LIST_ENTRIES',
56165616
p_column_to_evaluate => 'ENTRY_TEXT',
56175617
p_component_id => 'LIST_ID',
5618-
p_component_name => 'ENTRY_TEXT',
5618+
p_component_name => 'LIST_NAME:ENTRY_TEXT',
56195619
p_column_name => '',
56205620
p_item_name => '',
5621-
p_shared_comp_name => 'LIST_NAME',
5621+
p_shared_comp_name => 'LIST_ENTRY_ID',
56225622
p_operand => 'CRITERIA',
56235623
p_val_char => '',
56245624
p_val_number => null,

product/sert/sert_core/seed_data/110_rule_import_24_1.sql.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5617,10 +5617,10 @@ begin
56175617
p_view_name => 'APEX_APPLICATION_LIST_ENTRIES',
56185618
p_column_to_evaluate => 'ENTRY_TEXT',
56195619
p_component_id => 'LIST_ID',
5620-
p_component_name => 'ENTRY_TEXT',
5620+
p_component_name => 'LIST_NAME:ENTRY_TEXT',
56215621
p_column_name => '',
56225622
p_item_name => '',
5623-
p_shared_comp_name => 'LIST_NAME',
5623+
p_shared_comp_name => 'LIST_ENTRY_ID',
56245624
p_operand => 'CRITERIA',
56255625
p_val_char => '',
56265626
p_val_number => null,
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
--changeset mipotter:alter_table_sert_core.eval_results_add_constraint_result_is_json endDelimiter:; runOnChange:true runAlways:false rollbackEndDelimiter:; stripComments:false
3+
--preconditions onFail:MARK_RAN onError:HALT
4+
--precondition-sql-check expectedResult:0 select count(1) from dba_constraints where owner = 'SERT_CORE' and constraint_name = 'RESULT_IS_JSON'
5+
ALTER TABLE sert_core.eval_results ADD CONSTRAINT result_is_json CHECK (result IS JSON) ENABLE novalidate;
6+
--rollback alter table sert_core.eval_results drop constraint RESULT_IS_JSON;
7+
8+
--changeset mipotter:create_index_sert_core.eval_results_result_jidx_1752059964456 endDelimiter:; runOnChange:true runAlways:false rollbackEndDelimiter:; stripComments:false
9+
--preconditions onFail:MARK_RAN onError:HALT
10+
--precondition-sql-check expectedResult:0 select count(1) from dba_indexes where owner = 'SERT_CORE' and table_name = 'EVAL_RESULTS' and index_name = 'EVAL_RESULTS_RESULT_JIDX';
11+
create search index sert_core.eval_results_result_jidx on sert_core.eval_results(result) for json;
12+
--rollback drop INDEX sert_core.eval_results_result_jidx;
13+
*/

0 commit comments

Comments
 (0)