Dependencies in Package not recognised
--------------------------------------

                 Key: CORE-5383
                 URL: http://tracker.firebirdsql.org/browse/CORE-5383
             Project: Firebird Core
          Issue Type: Bug
    Affects Versions: 3.0.1
            Reporter: Rainer Hornung
            Priority: Critical


Only the last package body procedure/function block is included for 
dependencies check.

CREATE TABLE T_NEW_TABLE_01 (NEW_FIELD_01 INTEGER NOT NULL, FIELD01 INTEGER);
ALTER TABLE T_NEW_TABLE_01 ADD CONSTRAINT PK_T_NEW_TABLE_01 PRIMARY KEY 
(NEW_FIELD_01);

CREATE TABLE T_NEW_TABLE_02 (NEW_FIELD_02 INTEGER NOT NULL, FIELD02 INTEGER);
ALTER TABLE T_NEW_TABLE_02 ADD CONSTRAINT PK_T_NEW_TABLE_02 PRIMARY KEY 
(NEW_FIELD_02);

CREATE TABLE T_NEW_TABLE_03 (NEW_FIELD_03 INTEGER NOT NULL, FIELD03 INTEGER);
ALTER TABLE T_NEW_TABLE_03 ADD CONSTRAINT PK_T_NEW_TABLE_03 PRIMARY KEY 
(NEW_FIELD_03);

CREATE package package_01
as
begin
 
end;

CREATE package body package_01
as
BEGIN
 PROCEDURE P01(iInput INTEGER) RETURNS (oOutput INTEGER)
 AS
 BEGIN
/* Dependencies is created for T_New_Tabel01 */
   SELECT NEW_FIELD_01 FROM T_NEW_TABLE_01 INTO :oOutput;
  END 
END;

CREATE package package_02
as
begin
 
end;

CREATE package body package_02
as
BEGIN
 PROCEDURE P01(iInput INTEGER) RETURNS (oOutput INTEGER)
 AS
 BEGIN
   /* Dependencies is created for T_New_Tabel01 and T_New_Tabel02 and 
T_New_Tabel03  */
   SELECT NEW_FIELD_01 FROM T_NEW_TABLE_01 INTO :oOutput;
   SELECT NEW_FIELD_02 FROM T_NEW_TABLE_02 INTO :oOutput;
   SELECT NEW_FIELD_03 FROM T_NEW_TABLE_03 INTO :oOutput;
  END 
END;

CREATE package package_03
as
begin
 
end;

CREATE package body package_03
as
BEGIN
 PROCEDURE P01(iInput INTEGER) RETURNS (oOutput INTEGER)
 AS
 BEGIN
   /*No Dependencies is created !!!  */

   SELECT NEW_FIELD_01 FROM T_NEW_TABLE_01 INTO :oOutput;
  END

 PROCEDURE P02(iInput INTEGER) RETURNS (oOutput INTEGER)
 AS
 BEGIN
   /*No Dependencies is created !!!  */
   SELECT NEW_FIELD_02 FROM T_NEW_TABLE_02 INTO :oOutput;
  END

 PROCEDURE P03(iInput INTEGER) RETURNS (oOutput INTEGER)
 AS
 BEGIN
   /* Dependencies is only created for T_New_Tabel03  */
   SELECT NEW_FIELD_03 FROM T_NEW_TABLE_03 INTO :oOutput;
  END 

END;

CREATE package package_04
as
begin
   /*Package has no Dependencies, because last code block hat no 
table/procedure ... !!!  */
 
end;

CREATE package body package_04
as
BEGIN
 PROCEDURE P01(iInput INTEGER) RETURNS (oOutput INTEGER)
 AS
 BEGIN
   /*No Dependencies is created !!!  */
   SELECT NEW_FIELD_01 FROM T_NEW_TABLE_01 INTO :oOutput;
 END

 PROCEDURE P02(iInput INTEGER) RETURNS (oOutput INTEGER)
 AS
 BEGIN
   /*No Dependencies is created !!!  */
   SELECT NEW_FIELD_02 FROM T_NEW_TABLE_02 INTO :oOutput;
 END

 PROCEDURE P03(iInput INTEGER) RETURNS (oOutput INTEGER)
 AS
 BEGIN
   /*No Dependencies is created !!!  */
   SELECT NEW_FIELD_03 FROM T_NEW_TABLE_03 INTO :oOutput;
 END

 FUNCTION F_Add(Value1 Integer, Value2 Integer) RETURNS Integer AS
  BEGIN
   /*No Dependencies is created. Is Ok there is no Table etc. */
  RETURN :Value1 + Value2;
  END
END;
 

-- 
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

        

------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive. 
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to