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-issue-importer opened this issue Apr 15, 2015 · 6 comments

Comments

@firebird-issue-importer

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 16, 2015

Modified by: @hvlad

assignee: Vlad Khorsun [ hvlad ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 18, 2015

Commented by: Sean Leyne (seanleyne)

Edited Summary for readability

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 18, 2015

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 21, 2015

Modified by: @asfernandes

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

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 21, 2015

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 28, 2015

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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants