You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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).
The text was updated successfully, but these errors were encountered: