--
-- ###  Procedure fail check with subsequent drop
--

drop if exists procedure p1;
drop if exists procedure p2;


@
create procedure p1(a in int) return bool
begin
   return true;
end;
@

@
create procedure p2(a in int) return bool
begin
   if p1(:a)
   then
	var b int;         
        :b = date2long(NOVAR);	
    end;
   return true;
end;
@

-- this call should fail casused by NOVAR
:x = call p2(42);
call  p2(42);

-- lock should be released, so the procedure should be able to be dropped
drop procedure p1;



