On 10/10/16 13:10, Slavomir Skopalik wrote:
> Hi,
>
> I found different behavior of concatenation between FB2.5.6 and FB 3.0.1.
>
> FB 2.5.6:
>
> EXECUTE BLOCK RETURNS(T2 VARCHAR(70)) AS
> DECLARE T1 RDB$RELATION_NAME = 'T1';
> BEGIN
>     T2 = T1 || '_SUFIX';
>     SUSPEND;
>     T1 = 'T1234567890';
>     T2 = T1 || '_SUFIX';
>     SUSPEND;
> END
>
> T2
> ===============================================================================
>
>
> T1 _SUFIX
> T1234567890_SUFIX
>
> FB 3.0.1
>
> EXECUTE BLOCK RETURNS(T2 VARCHAR(70)) AS
> DECLARE T1 RDB$RELATION_NAME = 'T1';
> BEGIN
>     T2 = T1 || '_SUFIX';
>     SUSPEND;
>     T1 = 'T1234567890';
>     T2 = T1 || '_SUFIX';
>     SUSPEND;
> END
>
> T2
> ======================================================================
>
> T1 _SUFIX
> T1234567890 _SUFIX
>
> Slavek
>

To be precise the result in FB3 is:

T2
======================================================================
T1 _SUFIX
T1234567890                    _SUFIX

where _SUFIX starts exactly at position == 31 (see message text with 
monospace font to make sure), i.e. after the spaces present in the end 
of CHAR(31) field RDB$RELATION_NAME. I'm not sure we will fix it in 2.5.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to