Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependencies in Package not recognised [CORE5383] #5656

Closed
firebird-automations opened this issue Oct 27, 2016 · 5 comments
Closed

Dependencies in Package not recognised [CORE5383] #5656

firebird-automations opened this issue Oct 27, 2016 · 5 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Rainer Hornung (rhornung)

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;

Commits: ea4e605 1f74d2c

@firebird-automations
Copy link
Collaborator Author

Modified by: Rainer Hornung (rhornung)

Component: Engine [ 10000 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 4.0 Alpha 1 [ 10731 ]

Fix Version: 3.0.2 [ 10785 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: No test => Done successfully

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment