Subject | Re: Slight UDF Mystery . . . |
---|---|
Author | i5cvalde |
Post date | 2004-12-24T08:30:14Z |
--- In firebird-support@yahoogroups.com, "Ivan Prenosil"
<Ivan.Prenosil@s...> wrote:
http://cvs.sourceforge.net/viewcvs.py/firebird/firebird2/src/jrd/fun.epp?r1=1.22&r2=1.23
Done on 2003.08.04
Notice the comment by Nickolay is misleading:
Fix string trunction bug when calling UDFs using BY DESCRIPTOR
convention with CHAR/VARCHAR octets parameters.
Found and fixed by Fred Polizo.
It has nothing to do with using raw descriptors per se. Indeed, it
affects operations when results are returned not through descriptors.
It happened more than 16 months ago, so I think it applies to FB1.5
and FB2.
C.
<Ivan.Prenosil@s...> wrote:
> > From: "i5cvalde" <cvalde@u...>:CString.
> > <Ivan.Prenosil@s...> wrote:
> > > After quick test, it *seems* that returning CHARs (including binary
> > > zero) works in FB1.5.2. But I'm puzzled, because there is no mention
> > > about fixing this bug in Release Notes, and returning VARCHARs
> > > still does not work (did somebody fixed just half of the bug ?).
> >
> > Ivan:
> > You are a long-time, respected, very experienced IB/FB developer.
> > Could you be less newbie-behaved and describe which bug you are
> > referring to, please? Or do I have to guess?
>
> Sorry, if I spend more time writing my email in friday, I would miss
> the last bus and had to sleep in office.
>
> The bug was discussed several times in both support and devel lists,
> and the problem was that regardless of declaration of the return value
> (Cstring/Char/Varchar), Firebird always interpreted return value as
> (So e.g. for varchar with length<256 the first byte was binary zero,Probably this is what you wanted to read:
> thus the result was empty string.)
http://cvs.sourceforge.net/viewcvs.py/firebird/firebird2/src/jrd/fun.epp?r1=1.22&r2=1.23
Done on 2003.08.04
Notice the comment by Nickolay is misleading:
Fix string trunction bug when calling UDFs using BY DESCRIPTOR
convention with CHAR/VARCHAR octets parameters.
Found and fixed by Fred Polizo.
It has nothing to do with using raw descriptors per se. Indeed, it
affects operations when results are returned not through descriptors.
It happened more than 16 months ago, so I think it applies to FB1.5
and FB2.
C.