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

Backport to 2.5 ability of ISQL to proper extract metadata with VIEW that depends on PROCEDURE (by generating empty headers of all SP *before* any 'CREATE VIEW') [CORE5076] #5363

Closed
firebird-automations opened this issue Jan 17, 2016 · 1 comment

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @pavel-zotov

Votes: 1

Apply following scripton empty DB:

set term ^;
create procedure sp_test returns(y int) as begin y = 2; suspend; end^
create view v_test as select y from sp_test
^
exit
^

The run ISQL -X.

On 3.0 it will issue:

COMMIT WORK;
SET AUTODDL OFF;
SET TERM ^ ;

CREATE OR ALTER PROCEDURE SP_TEST RETURNS (Y INTEGER)
AS
BEGIN SUSPEND; END ^

SET TERM ; ^
COMMIT WORK;
SET AUTODDL ON;

CREATE VIEW V_TEST (Y) AS
select y from sp_test;

COMMIT WORK;
SET AUTODDL OFF;
SET TERM ^ ;

ALTER PROCEDURE SP_TEST RETURNS (Y INTEGER)
AS
begin y = 2; suspend; end ^

SET TERM ; ^
COMMIT WORK;
SET AUTODDL ON;

On 2.5 it will be INVALID:

SET SQL DIALECT 3;
CREATE VIEW V_TEST (Y) AS
select y from sp_test ; ------------------------- forward reference!
COMMIT WORK;

SET AUTODDL OFF;
SET TERM ^ ;

CREATE PROCEDURE SP_TEST RETURNS (Y INTEGER)
AS
BEGIN SUSPEND; END ^

ALTER PROCEDURE SP_TEST RETURNS (Y INTEGER)
AS
begin y = 2; suspend; end ^
SET TERM ; ^
COMMIT WORK ;
SET AUTODDL ON;

It will be nice if extracting empty procedure header before any view will be backported to FB 2.5.x.

PS. Sorry if this ticket is duplicate (in what I almost have no doubt).

@mrotteveel
Copy link
Member

Closing given Firebird 2.5 is end-of-life.

@mrotteveel mrotteveel closed this as not planned Won't fix, can't repro, duplicate, stale May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants