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

EXECUTE STATEMENT with "?" as arguments for "UPDATE <TABLE> SET <FIELD> =" produces "-Data type unknown" exception [CORE4773] #5072

Closed
firebird-automations opened this issue Apr 25, 2015 · 5 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @pavel-zotov

execute block as
declare v_stt varchar(255);
declare v_blob_a blob = 'qwertyuioplkjhgfdsazxcvbnm';
declare v_blob_b blob = '1234567890asdfghjklmnbvcxz';
begin
v_stt = 'update tb set b1 = case when id in (1,2) then ? else ? end';
execute statement ( v_stt ) ( v_blob_a, v_blob_b );
end

-- on WI-V2.5.5.26865 produres error:

Statement failed, SQLSTATE = HY004
Dynamic SQL Error
-SQL error code = -804
-Data type unknown

No such error on WI-T3.0.0.31805.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

description: execute block as
declare v_stt varchar(255);
declare v_blob_a blob = 'qwertyuioplkjhgfdsazxcvbnm';
declare v_blob_b blob = '1234567890asdfghjklmnbvcxz';
begin
v_stt = 'update tb set b1 = case when id in (1,2) then ? else ? end';
execute statement ( v_stt ) ( v_blob_a, v_blob_b );
end

-- on WI-V2.5.5.26865 produres error:

Statement failed, SQLSTATE = HY004
Dynamic SQL Error
-SQL error code = -804
-Data type unknown

No such error on WI-T3.0.0.31805.

PS. 2 admin(s): please remove my post with timestamp 22/Apr/15 06:45 AM from CORE4752 because it is irrelevant to that.

=>

execute block as
declare v_stt varchar(255);
declare v_blob_a blob = 'qwertyuioplkjhgfdsazxcvbnm';
declare v_blob_b blob = '1234567890asdfghjklmnbvcxz';
begin
v_stt = 'update tb set b1 = case when id in (1,2) then ? else ? end';
execute statement ( v_stt ) ( v_blob_a, v_blob_b );
end

-- on WI-V2.5.5.26865 produres error:

Statement failed, SQLSTATE = HY004
Dynamic SQL Error
-SQL error code = -804
-Data type unknown

No such error on WI-T3.0.0.31805.

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

Sorry, Pavel, In CORE4752 I didn't suggested you to create a new ticket.

I said it's something fixed, but didn't search the tracker. And it has nothing to do with EXECUTE STATEMENT, just try the UPDATE alone.

Parser and DSQL changed a lot in 3.0. This is not going to be backported to 2.5 IMO.

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

Closed based on Adriano's comments

@firebird-automations
Copy link
Collaborator Author

Modified by: Sean Leyne (seanleyne)

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

resolution: Won't Fix [ 2 ]

@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