Subject | Re: [firebird-support] Stored Proc to act like the string.Copy method in Delphi |
---|---|
Author | Bogusław Brandys |
Post date | 2005-07-07T14:41:36Z |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Martin Dew wrote:
blocation = F_MID(:v3_location,2,5);
How F_MID behaves in such case ?
Or v3_location is NULL for example ?
Regards
Boguslaw Brandys
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCzT8gtuGICzHOh+YRAmbGAJ9eBJRr8Am1lHeCxcThMMrbSEDfjQCcCsJ2
1bfFM5Mv9NP2dKq9Z23dHJs=
=/Rr6
-----END PGP SIGNATURE-----
Hash: SHA1
Martin Dew wrote:
>>>and you're sure its the F_MID UDF? I've used it for years and neverAnd what if :v3_location is less then 2 chars ?
>
> struck
>
>>>memory leaks from it.
>>>Alan
>
>
>
>
> Almost 100% sure, if we comment the following lines out of a stored
> proc, and then run it the memory does not increase, if we leave them in
> it increases;
>
>
>
> /* Convert the incoming status to one of our own for display
> purposes.*/
>
> alocation = F_LEFT(:V3_LOCATION,1);
>
>
>
> blocation = F_MID(:v3_location,2,5);
>
> blocation = F_RTRIM(:blocation);
>
>
>
> /* blocation holds the location without the c_ or b_ identifier before
> it, so this is the value you would */
>
> /* post into either the desp_car or desp_base field according to
> whether alocation is a b or a c */
>
>
>
> We have this stored proc at other sites, the only difference we can find
> with the other sites with no problem is the line containing the f_MID.
>
blocation = F_MID(:v3_location,2,5);
How F_MID behaves in such case ?
Or v3_location is NULL for example ?
Regards
Boguslaw Brandys
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCzT8gtuGICzHOh+YRAmbGAJ9eBJRr8Am1lHeCxcThMMrbSEDfjQCcCsJ2
1bfFM5Mv9NP2dKq9Z23dHJs=
=/Rr6
-----END PGP SIGNATURE-----