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

BLOBs are unnecessarily copied during UPDATE after a table format change [CORE6089] #6339

Closed
firebird-automations opened this issue Jun 29, 2019 · 6 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @dyemanov

Is related to CORE5600
Relate to CORE6090

Test case:

recreate table t (col1 int, col2 blob);

insert into t values (1, '1');
insert into t values (2, '2');
insert into t values (3, '3');
commit;

select * from t;

    COL1              COL2 

============ =================
1 84:0
2 84:1
3 84:2

update t set col1 = -col1;
select * from t;

    COL1              COL2 

============ =================
-1 84:0
-2 84:1
-3 84:2

-- So far so good: COL1 is negated, COL2 has the same BLOB IDs

rollback;

alter table t add col3 date;

select * from t;

    COL1              COL2        COL3 

============ ================= ===========
1 84:0 <null>
2 84:1 <null>
3 84:2 <null>

update t set col1 = -col1;
select * from t;

    COL1              COL2        COL3 

============ ================= ===========
-1 84:3 <null>
-2 84:4 <null>
-3 84:5 <null>

-- BUG: COL2 has different BLOB IDs, i.e. the whole blobs were copied rather than just their IDs

rollback;

This is a regression introduced while fixing CORE5600. v3.0.3 and later versions are affected.

Commits: 78b68a3 2e1f3f8

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Link: This issue is related to CORE5600 [ CORE5600 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Link: This issue relate to CORE6090 [ CORE6090 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Vlad Khorsun [ hvlad ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

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

resolution: Fixed [ 1 ]

Fix Version: 3.0.5 [ 10885 ]

Fix Version: 4.0 Beta 2 [ 10888 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: No test => Done successfully

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment