Issue Details (XML | Word | Printable)

Key: CORE-4472
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dmitry Yemanov
Reporter: Pavel Zotov
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Message "Modifying function <F> which is currently in use" when running script with AUTODDL=OFF and <F> is called from INTERNAL function declared in other unit

Created: 25/Jun/14 10:42 AM   Updated: 22/Dec/15 10:48 AM
Component/s: Engine
Affects Version/s: 3.0 Alpha 2
Fix Version/s: 3.0 Beta 2

QA Status: Done successfully


 Description  « Hide
The following script will cause appearing message "Modifying function <FN_01> which is currently in use by active user requests" in firebird.log in case when <FN_01> is called from some INTERNAL function inside another unit (procedure `sp_01` in sample beneath):

set autoddl off;
commit;
set term ^;
create or alter function fn_01() returns int -- <<<<<<<<< this function will be CALLED from another
as begin
   return 1;
end
^

create or alter procedure sp_01
as
    declare function fn_internal_01 returns int as -- <<< ::: NB ::: this is INTERNAL function which CALLS `fn_01`
    begin
      if ( fn_01() > 0 ) then return 1;
      else return 0;
    end
begin
end
^
set term ;^
commit;


Every run of this script (in single connect, of course) will cause adding of new message in firebird.log:

oel64 Wed Jun 25 14:26:27 2014
        Modifying function FN_01 which is currently in use by active user requests


oel64 Wed Jun 25 14:26:29 2014
        Modifying function FN_01 which is currently in use by active user requests
. . .


PS-1. No such message was in FB builds before 09.06.2014.
PS-2. No such message appear if function FN_01 is called from "common" (top-level) SP or function:

set autoddl off;
commit;
set term ^;
create or alter function fn_01() returns int
as begin
   return 1;
end
^

create or alter function fn_02() returns int
as begin
   return fn_01();
end
^

create or alter procedure sp_01
as
    declare x int;
begin
  x=fn_01();
end
^
set term ;^
commit;

-- this works OK.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.