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 using BLOB parameters results in "Invalid BLOB ID" error [CORE4752] #5056

Closed
firebird-automations opened this issue Apr 15, 2015 · 6 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @pavel-zotov

recreate table tb(id int, b1 blob);
commit;
insert into tb(id) values(1);
insert into tb(id) values(2);
insert into tb(id) values(3);
commit;

set term ^;
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';
v_stt = 'update tb set b1 = case when id in (1,2) then cast(? as blob) else cast(? as blob) end';
execute statement ( v_stt ) ( v_blob_a, v_blob_b );
end
^
set term ;^

Output (both in 2.5 and 3.0):

Statement failed, SQLSTATE = 42000
invalid BLOB ID

Commits: 82a6d00 1fdf364 FirebirdSQL/fbt-repository@297e8e0 FirebirdSQL/fbt-repository@219a34f

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

assignee: Vlad Khorsun [ hvlad ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

Edited Summary for readability

@firebird-automations
Copy link
Collaborator Author

Modified by: Sean Leyne (seanleyne)

summary: Invalid BLOB ID message in parametrized ES when substitute arguments of BLOB type => EXECUTE STATEMENT using BLOB parameters results in "Invalid BLOB ID" error

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Vlad Khorsun [ hvlad ] => Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 3.0 Beta 2 [ 10586 ]

Fix Version: 2.5.5 [ 10670 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Done successfully

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

2 participants