Subject Re: Potential computed by and UDF issue
Author robschuff
Does anyone care to take this question on please? Is there somewhere
else I should report potential bugs?

thanks

Rob

--- In firebird-support@yahoogroups.com, "robschuff" <rob@b...> wrote:
>
>
> Hi folks,
>
> Firebird 1.5 WI-V6.3.0.4306 Super server on Windows.
>
> I seem to have found an issue with field computed by a UDF. Seems
> that I can define the field and use it just fine. Furthermore, a
> backup and gfix reveal no problems, but when I attempt to do a restore
> I get an error message and the table is not restored
>
> The error message (from IBExpert) is:
>
> IBE: Starting restore. Current time: 8:11:37 AM
> gbak: opened file C:\dbdev\UDFComputedBy.FBK
> gbak: transportable backup -- data in XDR format
> gbak: backup file is compressed
> IBE: Unsuccessful execution caused by system error that does not
> preclude successful execution of subsequent statements.
> action cancelled by trigger (0) to preserve data integrity.
> could not find table/procedure for GRANT.
>
> Here is the DDL for a simple test case.
>
>
/******************************************************************************/
> /**** Generated by IBExpert 2004.10.30 2/7/2005 8:19:45 AM
> ****/
>
/******************************************************************************/
>
> SET SQL DIALECT 3;
>
> DECLARE EXTERNAL FUNCTION SUBSTR
> CSTRING(80),
> SMALLINT,
> SMALLINT
> RETURNS CSTRING(80) FREE_IT
> ENTRY_POINT 'IB_UDF_substr' MODULE_NAME 'ib_udf';
>
> CREATE TABLE NEW_TABLE (
> NEW_FIELD VARCHAR(20),
> CALCFIELD COMPUTED BY
> (substr(new_field,1,1)||substr(new_field,2,1)));
>
> Is this a bug or am I doing something wrong?
>
> thanks
>
> rob