Issue Details (XML | Word | Printable)

Key: CORE-4752
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Adriano dos Santos Fernandes
Reporter: Pavel Zotov
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Firebird Core

EXECUTE STATEMENT using BLOB parameters results in "Invalid BLOB ID" error

Created: 15/Apr/15 08:15 PM   Updated: 28/May/15 02:48 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 3.0 Beta 2, 2.5.5

QA Status: Done successfully


 Description  « Hide
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


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Sean Leyne added a comment - 18/Apr/15 05:45 AM
Edited Summary for readability