Issue Details (XML | Word | Printable)

Key: CORE-6257
Type: Bug Bug
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: Petr Gurin
Votes: 0
Watchers: 2
Operations

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

Changing field type for depended on procedure can result for depended procedure to have missed field types links

Created: 27/Feb/20 03:13 PM   Updated: 27/Feb/20 03:14 PM
Component/s: Engine
Affects Version/s: 3.0.5
Fix Version/s: None

QA Status: No test


 Description  « Hide
1. Create the first stored procedure with output parameters defined without domain specification, e.g. 'integer' or varchar(255). The engine will create a new record in RDB$FIELDS table (domain named like 'RDB$1234')
2. Create a view using this stored procedure
3. Create the second stored procedure with output parameters defined as 'type of column VIEWNAME.FIELDNAME'
4. Change type of parameters in the first procedure for a certain domain. The engine will delete 'RDB$1234' record from RDB$FIELDS
The second procedure will have a link on a record in RDB$FIELDS that doesn't exist any more.

DDL is below:
SET TERM # ;

CREATE DOMAIN TTEXT1024 AS
VARCHAR(1024) CHARACTER SET WIN1251
COLLATE WIN1251#

create or alter procedure AA_DOMAINS_PROCEDURE_INT
returns
(
  with_domain ttext1024,
  without_domain varchar(1024)
)
as
begin
  with_domain = 'with domain';
  without_domain = 'without domain';
  suspend;
end#

create or alter view AA_DOMAINS_VIEW
(
  with_domain,
  without_domain
)
as
select d.with_domain, d.without_domain from rdb$database r
left join aa_domains_procedure_int d on 1 = 1#

create or alter procedure AA_DOMAINS_PROCEDURE_EXT
returns
(
  with_domain type of column aa_domains_view.with_domain,
  without_domain type of column aa_domains_view.without_domain
)
as
begin
  for select with_domain, without_domain from aa_domains_view into with_domain, without_domain
  do suspend;
end#

create or alter procedure AA_DOMAINS_PROCEDURE_INT
returns
(
  with_domain ttext1024,
  without_domain ttext1024
)
as
begin
  with_domain = 'with domain';
  without_domain = 'without domain';
  suspend;
end#

SET TERM ; #


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.