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

Signature mismatch when creating package body on identical packaged procedure header [CORE6250] #2311

Closed
firebird-issue-importer opened this issue Feb 19, 2020 · 10 comments

Comments

@firebird-issue-importer

Submitted by: @asfernandes

Attachments:
c6250-batch-and-two-cases-of-DDL_-_with-and-without-problem-in-compiling.7z

Sent in fb-devel by Jiri Cincura with thread "Procedure has a signature mismatch on package body".

I'm getting the error in %subj%, when I try to recreate package body of an existing package, BUT the package body is taken without any changes from rdb$packages.rdb$package_body_source. How is this possible? If I do "create or alter" on header (again taken from rdb$packages) right before it's fine. The rbb$valid_body_flag is 1.

The package itself has only one procedure with this definition:
CREATE OR ALTER PACKAGE QRY_STAFF AS
begin
procedure SALES_PER_USER_PRODUCTGROUP (
IN_FROM D_DATE,
IN_UNTIL D_DATE)
returns (
OUT_US_NAME type of column T_USER.F_US_USERNAME,
OUT_PERS_NAME type of column T_PERSON.F_PERS_NAME,
OUT_PERS_FIRSTNAME type of column T_PERSON.F_PERS_FIRSTNAME,
OUT_PG_NAME type of column T_PRODUCT_GROUP.CF_PG_NAME,
OUT_TOTAL type of D_DECIMAL);

end

Not something terribly complicated. The only inteeresting thing is the OUT_PG_NAME parameter, which uses "type of column" on a "computed by" table column.

Commits: fe95da8 1f13d17 cead43b 7b21d3b

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 19, 2020

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 19, 2020

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 4.0 Beta 2 [ 10888 ]

Fix Version: 3.0.6 [ 10889 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 20, 2020

Modified by: @pavel-zotov

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

QA Status: No test => Deferred

Test Details: Can not reproduce (perhaps missed smth.).
Sent letter to Adriano, 20.02.2020 08:49.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 21, 2020

Modified by: @pavel-zotov

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

QA Status: Deferred => Done with caveats

Test Details: Can not reproduce (perhaps missed smth.).
Sent letter to Adriano, 20.02.2020 08:49.

=>

Reproduced but fix seems not yet completed: problem remains when procedure parameter uses build-in datatype (say, timestamp) rather than user-defined domain.
Sent example to Adriano, 21.02.2020 14:32.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 21, 2020

Commented by: @pavel-zotov

it seems to me that somethink needs to be fixed in engine related to CORE6250.

If we create packaged procedure that has parameter base on DOMAIN type -- all fine, backup-restore will not lead to any problem during compiling such package body.
But if this procedure has parameter of built-in datatype (say, timestamp) - the problem still exists.

Please consider attached file: "c6250-batch-and-two-cases-of-DDL_-_with-and-without-problem-in-compiling.7z"

Open batch from this attach, correct following settings:

set ISC_USER=SYSDBA
set ISC_PASSWORD=masterkey
set fbc=C:\FB\40SS

-- and run it.

SQL script that is called "c6250d.sql" looks like this:

create domain dm_dts timestamp;
commit;

set term ^;
create or alter package pg_test as
begin
procedure sp_test ( a_since dm_dts ) ;
end
^
recreate package body pg_test as
begin
procedure sp_test ( a_since dm_dts ) as begin end
end
^
set term ;^
commit;

- and work for it will completed OK.

But second SQL will raise failure in compiling after b/r.

Note that it does not refer to any user-defined datatype:

set term ^;
create or alter package pg_test as
begin
procedure sp_test ( a_since timestamp ) ;
end
^
recreate package body pg_test as
begin
procedure sp_test ( a_since timestamp ) as begin end
end
^
set term ;^
commit;

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 21, 2020

Modified by: @pavel-zotov

Attachment: c6250-batch-and-two-cases-of-DDL_-_with-and-without-problem-in-compiling.7z [ 13426 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 21, 2020

Commented by: @asfernandes

Pavel, please test again.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 23, 2020

Commented by: @pavel-zotov

Checked 4.0.0.1783 and 3.0.6.33254 -- all fine.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 23, 2020

Modified by: @pavel-zotov

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

QA Status: Done with caveats => Done successfully

Test Details: Reproduced but fix seems not yet completed: problem remains when procedure parameter uses build-in datatype (say, timestamp) rather than user-defined domain.
Sent example to Adriano, 21.02.2020 14:32.

=>

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 23, 2020

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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants