Skip to content

Commit

Permalink
OraOpenSource#136 fix (still needs to be cleaned up)
Browse files Browse the repository at this point in the history
  • Loading branch information
martindsouza committed Aug 11, 2015
1 parent 39727b4 commit a63efef
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 27 deletions.
Binary file added releases/logger_3.1.1.zip
Binary file not shown.
3 changes: 2 additions & 1 deletion source/procedures/logger_configure.plb
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ begin
-- l_sql := q'[alter trigger BI_LOGGER_LOGS compile PLSQL_CCFLAGS=']'||l_variables||q'[' reuse settings]';
-- execute immediate l_sql;

l_sql := q'!alter trigger biu_logger_prefs compile PLSQL_CCFLAGS='CURRENTLY_INSTALLING:FALSE'!';
-- -- TODO mdsouza: 3.1.1 org l_sql := q'!alter trigger biu_logger_prefs compile PLSQL_CCFLAGS='CURRENTLY_INSTALLING:FALSE'!';
l_sql := q'!alter trigger biu_logger_prefs compile!';
execute immediate l_sql;

-- just in case this is a re-install / upgrade, the global contexts will persist so reset them
Expand Down
56 changes: 30 additions & 26 deletions source/tables/logger_prefs.sql
Original file line number Diff line number Diff line change
Expand Up @@ -27,32 +27,33 @@ end;
/


-- #TODO:130 mdsouza: logger 3.1.1 fix. Removed currently_installing
-- Append existing PLSQL_CCFLAGS
-- Since may be set with existing flags (specifically no_op)
var cur_plsql_ccflags varchar2(500);

declare
parnam varchar2(256);
intval binary_integer;
strval varchar2(500);
partyp binary_integer;
begin
partyp := dbms_utility.get_parameter_value('plsql_ccflags',intval, strval);

if strval is not null then
strval := ',' || strval;
end if;
:cur_plsql_ccflags := strval;
end;
/

-- Convert bind variable to substitution string
-- https://blogs.oracle.com/opal/entry/sqlplus_101_substitution_varia
column cur_plsql_ccflags new_value cur_plsql_ccflags
select :cur_plsql_ccflags cur_plsql_ccflags from dual;

alter session set plsql_ccflags='currently_installing:true&cur_plsql_ccflags'
/
-- var cur_plsql_ccflags varchar2(500);
--
-- declare
-- parnam varchar2(256);
-- intval binary_integer;
-- strval varchar2(500);
-- partyp binary_integer;
-- begin
-- partyp := dbms_utility.get_parameter_value('plsql_ccflags',intval, strval);
--
-- if strval is not null then
-- strval := ',' || strval;
-- end if;
-- :cur_plsql_ccflags := strval;
-- end;
-- /
--
-- -- Convert bind variable to substitution string
-- -- https://blogs.oracle.com/opal/entry/sqlplus_101_substitution_varia
-- column cur_plsql_ccflags new_value cur_plsql_ccflags
-- select :cur_plsql_ccflags cur_plsql_ccflags from dual;
--
-- alter session set plsql_ccflags='currently_installing:true&cur_plsql_ccflags'
-- /

create or replace trigger biu_logger_prefs
before insert or update on logger_prefs
Expand All @@ -70,7 +71,9 @@ begin
:new.pref_value := upper(:new.pref_value);
end if;

$if $$currently_installing is null or not $$currently_installing $then
-- #TODO:50 mdsouza: 3.1.1
-- #TODO:100 mdsouza: if removing then decrease indent
-- $if $$currently_installing is null or not $$currently_installing $then
-- Since logger.pks may not be installed when this trigger is compiled, need to move some code here
if 1=1
and :new.pref_type = logger.g_pref_type_logger
Expand Down Expand Up @@ -114,7 +117,8 @@ begin

-- this is because the logger package is not installed yet. We enable it in logger_configure
logger.null_global_contexts;
$end
-- #TODO:60 mdsouza: 3.1.1
-- $end
$end -- $$logger_no_op_install
end;
/
Expand Down

0 comments on commit a63efef

Please sign in to comment.