Open
Description
- Run this script on FB 3.x (it will finish w/o errors):
shell if exist r:\temp\tmp4test.fdb del r:\temp\tmp4test.fdb;
create database 'localhost:r:\temp\tmp4test.fdb';
set term ^;
create procedure sp_test as
begin
suspend;
end
^
commit
^
- Make backup using FB 3.x and then restore using FB 4.x or 5.x (let target DB name is:
r:\temp\tmp4test.fb5x.fdb
) - Run
%FB5_HOME%\isql.exe -x r:\temp\tmp4test.fb5x.fdb
- Script will be like this:
SET SQL DIALECT 3;
/* CREATE DATABASE 'localhost:r:\temp\tmp4test.fb5x.fdb' PAGE_SIZE 8192 DEFAULT CHARACTER SET NONE; */
COMMIT WORK;
COMMIT WORK;
SET AUTODDL OFF;
SET TERM ^ ;
/* Stored procedures headers */
CREATE OR ALTER PROCEDURE SP_TEST AS
BEGIN SUSPEND; END ^
SET TERM ; ^
COMMIT WORK;
SET AUTODDL ON;
COMMIT WORK;
SET AUTODDL OFF;
SET TERM ^ ;
/* Stored procedures bodies */
ALTER PROCEDURE SP_TEST AS
begin
suspend;
end ^
SET TERM ; ^
COMMIT WORK;
SET AUTODDL ON;
- Open extracted metadata script, uncomment
create database
- Remove
r:\temp\tmp4test.fb5x.fdb
- Try to apply extracted metadata.
- Error will raise:
/* Stored procedures headers */
CREATE OR ALTER PROCEDURE SP_TEST AS
BEGIN SUSPEND; END ^
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-CREATE OR ALTER PROCEDURE SP_TEST failed
-Dynamic SQL Error
-SQL error code = -104
-SUSPEND could not be used without RETURNS clause in PROCEDURE or EXECUTE BLOCK
After line 11 in file R:\Temp\tmp4test.fb5X.meta.sql
Procedure without output parameters (i.e. w/o RETURNS
clause in declaration) must not have SUSPEND
according to #6483
It will be useful if isql -x
will do smth like "carving" of SUSPEND
from header and body of such SP
Otherwise long-time consuming task raises related to writing 'smart parser' of extracted metadata (because SP declaration can either have or have no 'returns' clause at one of its previous lines).