Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UDF cstring arguments with SQLParameters adding space to value [CORE4825] #5122

Closed
firebird-automations opened this issue Jun 2, 2015 · 4 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Mustafa YILMAZ (myilmaz)

Duplicates CORE4604

Votes: 1

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;

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

Duplicates CORE4604.

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Duplicate [ 3 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

Link: This issue duplicates CORE4604 [ CORE4604 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant