Subject Re: UDF Failure
Author alex_vnru
--- In ib-support@y..., Paul Reeves <paul@f...> wrote:
> iananewby wrote:
> Ah, you should read the FAQ here: http://www.ibphoenix.com It
explains
> all. The problem has arisen because no check was made on expression
> size. It was possible to crash the server because of this. There is
now
> a check and string expressions that evaluate to greater than 32k
fail.
>
> I'm not sure how this one is going to be resolved. String
expressions
> have to max out somewhere and 32k seems reasonable to me. The real
> problem is that no check was ever made in the past, so more than a
few
> people have unknowingly taken advantage of this.


Paul, sorry if I repost, first message walks for a couple of hours
somewhere. I have a doubt: is it correct to check not an aexpression
result but operands declarations or intermediate result (I'm not shure
what's done)? Next statements should provide result within range but
are rejected now:

Trimmed result of concatenation

select Trim(cast ('c' as varchar (32000)) || Cast ('c' as varchar
(32000))) from rdb$database

Trimmed first operand

select Trim(cast ('c' as varchar (32700))) || Cast ('c' as varchar
(32700)) from rdb$database

In last it seems something wrong with check itself, because

select Trim(cast ('c' as varchar (32500))) || Cast ('c' as varchar
(32500)) from rdb$database

is successfully executed.

Best regards, Alexander V.Nevsky.