Issue Details (XML | Word | Printable)

Key: CORE-6250
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Adriano dos Santos Fernandes
Reporter: Adriano dos Santos Fernandes
Votes: 0
Watchers: 1
Operations

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

Signature mismatch when creating package body on identical packaged procedure header

Created: 19/Feb/20 01:13 AM   Updated: 01/Mar/20 06:20 PM
Component/s: Engine
Affects Version/s: 3.0.5
Fix Version/s: 4.0 Beta 2, 3.0.6

File Attachments: 1. File c6250-batch-and-two-cases-of-DDL_-_with-and-without-problem-in-compiling.7z (0.8 kB)


QA Status: Done successfully


 Description  « Hide
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.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Pavel Zotov added a comment - 21/Feb/20 11:41 AM
it seems to me that somethink needs to be fixed in engine related to CORE-6250.
 
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;

Adriano dos Santos Fernandes added a comment - 21/Feb/20 04:19 PM
Pavel, please test again.

Pavel Zotov added a comment - 23/Feb/20 06:20 PM
Checked 4.0.0.1783 and 3.0.6.33254 -- all fine.