Do not invalidate the package body when [CREATE OR] ALTER PACKAGE did not 
change the packet header
--------------------------------------------------------------------------------------------------

                 Key: CORE-4975
                 URL: http://tracker.firebirdsql.org/browse/CORE-4975
             Project: Firebird Core
          Issue Type: Improvement
            Reporter: Simonov Denis


Do not invalidate the package body when [CREATE OR] ALTER PACKAGE did not 
change the packet header. For example, adding comments or formatting source of 
the package header should not cause invalidation of the package body.

Test: 
#### 

set list on; 

set term ^; --------------------------------- [ 1:begin ] 
create package pkg_test as 
begin 
    procedure sp_test(a int); 
end 
^ ------------------------------------------- [ 1:end ] 

create package body pkg_test as 
begin 
    procedure sp_test (a int) as 
    begin 
    end 
end 
^ 
set term ;^ 
commit; 

select 'Before ALTER package statement, w/o any changes in it' as msg, 
p.rdb$package_name, p.rdb$valid_body_flag 
from rdb$packages p; 

set term ^; --------------------------------- [ 2:begin ] 
alter package pkg_test as 
begin 
    -- My comment
    procedure sp_test(a int); 
end 
^ ------------------------------------------- [ 2:end ] 
set term ;^ 
commit; 

select 'After ALTER package statement, w/o any changes in it' as msg, 
p.rdb$package_name, p.rdb$valid_body_flag 
from rdb$packages p; 

set echo on; 


Output: 
###### 

MSG Before ALTER package statement, w/o any changes in it 
RDB$PACKAGE_NAME PKG_TEST 
RDB$VALID_BODY_FLAG 1 


MSG After ALTER package statement, w/o any changes in it 
RDB$PACKAGE_NAME PKG_TEST 
RDB$VALID_BODY_FLAG 0                                       <-- Why? This 
modification should not make the package body invalid.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to