UDF cstring arguments with SQLParameters adding space to value
--------------------------------------------------------------

                 Key: CORE-4825
                 URL: http://tracker.firebirdsql.org/browse/CORE-4825
             Project: Firebird Core
          Issue Type: Bug
          Components: UDF
    Affects Versions: 2.5.3 Update 1
         Environment: windows 7 x64
            Reporter: Mustafa YILMAZ
            Priority: Minor


test sql:
set term ^ ;

DECLARE EXTERNAL FUNCTION strlen
        CSTRING(32767)
        RETURNS INTEGER BY VALUE
        ENTRY_POINT 'IB_UDF_strlen' MODULE_NAME 'ib_udf' ^
        
execute block
returns
(
  a integer
)
as
begin
  execute statement ('SELECT strlen(?) FROM RDB$DATABASE') ('123') into :a;
  suspend;
  execute statement ('SELECT strlen(''123'') FROM RDB$DATABASE') into :a;
  suspend;
end

result:
32767
3

in metd.epp:
// dimitr: adjust the UDF arguments for CSTRING
                                        if (d.dsc_dtype == dtype_cstring) {
                                                d.dsc_dtype = dtype_text; 



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to