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 garbage collector removed wrong blob if going blob descriptor contains 0:0 (NULL value) but field's NULL flag is not set [CORE1247] #1671

Closed
firebird-automations opened this issue May 7, 2007 · 11 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @hvlad

Error showed himself after 64-bit alignment issues was fixed as new code assumed correct relation_id in blob_id
This error can happen only because of direct modifications in system tables

Commits: ede01ab 9cfd2c8

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

summary: Blobs garbage collector removed wrong blob if going blob descriptor contains 0:0 (NULL value) but field have not NULL flag set => Blobs garbage collector removed wrong blob if going blob descriptor contains 0:0 (NULL value) but field's NULL flag is not set

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

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

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Martijn Tonies (martijntonies)

Vlad,

What direct modification of the system tables are we talking about?

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

I see blob_id 0:0 in record. Also i see that NULL flag is not set for this field.

The only reason i can imagine for this is as follow:
user have nullable field initially, insert record with NULL blob, set NOT NULL flag manually and updated record leaving NULL in blob

This just a guess as i saw 'corrupted' db only (not talking with user about it) and real case was a bit complex ;)

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

environment: FB 2.0.1 and in builds of FB 2.1.0 after Alpha 1 since 2007-03-23

Version: 2.1 Alpha 1 [ 10150 ] =>

@firebird-automations
Copy link
Collaborator Author

Commented by: Martijn Tonies (martijntonies)

Ah, so you mean that on the data page, for the field value, the NULL flag is not set, while it is set in the metadata ( by using a direct system table update? )

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Yes.

And i wrong that it can be done only by direct modifications in system tables ;)
We can add NOT NULL constraint via DDL of course.
We can't drop this constraint but this is another story ;)

@firebird-automations
Copy link
Collaborator Author

Commented by: @pcisar

As there is no clear and definitive test case (so the test was not created), I can only judge by changes made to the source, and it appears ok for both branches.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 12040 ] => Firebird [ 15551 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

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