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
Invalid blob id when add a new blob column of type text and update another field [CORE5600] #5866
Comments
Commented by: @ibprovider I ran this scenario via IBProvider (fb.direct mode, commit after each step) - the problem not detected. "select * from Operations" returns 20 records. Another test (commit after second step), also works without problem. |
Modified by: bug tracker (ty)Attachment: screenshot.png [ 13175 ] |
Commented by: @ibprovider What tools do you use? |
Modified by: @ibproviderAttachment: 2017_08_30__fbbug_5600__ibprovider_test-all_is_ok.png [ 13176 ] |
Commented by: bug tracker (ty) I use SQL Manager for InterBase and Firebird |
Commented by: bug tracker (ty) I still have the problem. |
Commented by: @hvlad Do you have explicit COMMIT after DDL statements ? |
Commented by: @pavel-zotov I do confirm that error also occured using ISQL:
=== If we uncomment line " --commit; -- ### [ 1 ] ###" than no errors will be. |
Commented by: bug tracker (ty) Yes I do COMMIT. |
Commented by: bug tracker (ty) Is there any way to fix this problem? |
Modified by: @hvladassignee: Vlad Khorsun [ hvlad ] |
Commented by: @hvlad The issue is that id of temporary blob was stored within the record, i.e. temporary blob was not materialized when created from default value. |
Modified by: @hvladstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0.3 [ 10810 ] Fix Version: 4.0 Beta 1 [ 10750 ] |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: No test => Done successfully |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: bug tracker (ty)
Relate to CORE6089
Relate to CORE6090
Attachments:
screenshot.png
2017_08_30__fbbug_5600__ibprovider_test-all_is_ok.png
I can create the issue using folowing steps:
step 1:
-------
CREATE TABLE Operation ( ID BIGINT NOT NULL,Operation_Type BIGINT NOT NULL,DATE_CREATE BIGINT NOT NULL,DATE_OPERATION BIGINT NOT NULL,Code BIGINT NOT NULL,NAME BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,D_VALUE DOUBLE PRECISION DEFAULT 0 NOT NULL )
step 2:
-------
ALTER TABLE Operation ADD CONSTRAINT operation_pk_1 PRIMARY KEY ( ID )
step 3:
-------
execute block
as
declare i bigint = 1;
begin
while (i <= 20) do
begin
update or insert into Operation(ID, Operation_Type,DATE_CREATE,DATE_OPERATION,Code,NAME,D_VALUE) values (:i,0,132345666243423423,132345666243423423,:i,'test',1);
i = i + 1;
end
end
step 4:
-------
ALTER TABLE Operation ADD surname BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
step 5:
-------
update operation set code=2 where id=2
When update is done if I run Select * from Operation, the error 'Invalid Blob Id' appears.
Commits: 2e1f3f8 8f893fd 2769de8
The text was updated successfully, but these errors were encountered: