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

Make insert´s and restart Identity Column can corrupt database [CORE5774] #6037

Open
firebird-automations opened this issue Mar 14, 2018 · 7 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Rafael Dipold (dipold)

Attachments:
CreateBD.sql
DoCorruptDB.sql
BUG.FDB
Print execution on ibexpert.jpg

I had difficulties to to make a minimal, complete, and verifiable example, because there seems to be some randomness involved.

A script to create the test database is attached.

The other script, when run a few times, corrupts the database.

@firebird-automations
Copy link
Collaborator Author

Modified by: Rafael Dipold (dipold)

Attachment: CreateBD.sql [ 13222 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: Rafael Dipold (dipold)

Attachment: DoCorruptDB.sql [ 13223 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Rafael Dipold (dipold)

I also added a corrupted database made by running the attached scripts

@firebird-automations
Copy link
Collaborator Author

Modified by: Rafael Dipold (dipold)

Attachment: BUG.FDB [ 13224 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: Rafael Dipold (dipold)

Attachment: Print execution on ibexpert.jpg [ 13225 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

There is two bugs in this ticket:

a) statement ALTER TABLE <table> ALTER <field> RESTART WITH <int>
forces not needed rebuild of all indices on <table>.<field>

Shoul add that there is more cases when ALTER of indexed field forced not needed rebuild of related indices.

b) deleted and not cleaned up records could not allow to create unique index as code in create index wrongly
assumes its backverions as primary record verions (see also CORE405)

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

assignee: Vlad Khorsun [ hvlad ]

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