Issue Details (XML | Word | Printable)

Key: CORE-5076
Type: Improvement Improvement
Status: Open Open
Priority: Trivial Trivial
Assignee: Unassigned
Reporter: Pavel Zotov
Votes: 1
Watchers: 3
Operations

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

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')

Created: 17/Jan/16 05:07 PM   Updated: 17/Jan/16 05:07 PM
Component/s: ISQL
Affects Version/s: 2.5.5
Fix Version/s: None

QA Status: No test


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

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