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

Incorrect result set (missing records) may be returned by the ORDER BY query navigating on an index [CORE5558] #5825

Closed
firebird-automations opened this issue Jun 7, 2017 · 9 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Marcel Portner (mpo)

Is duplicated by CORE5672

Attachments:
sql_desc.jpg
sql_asc.jpg

I had a database where the result set are incorrect, when the query use an ORDER BY ASC. On this TITITELTHEMA field it has an ascending index.
After a backup/restore everything worked again correctly.
In the firebird.log no error entry is available.
I think the index is in this case corrupt.
Is this problem known?

@firebird-automations
Copy link
Collaborator Author

Modified by: Marcel Portner (mpo)

Attachment: sql_desc.jpg [ 13131 ]

Attachment: sql_asc.jpg [ 13132 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Make sure there is no connections to the database
run gfix -v -full <database>
show gfix output here (text, not a picture, pls)
show new lines in firebird.log if present
run gstat -h <database>
show gstat output here

@firebird-automations
Copy link
Collaborator Author

Commented by: Marcel Portner (mpo)

Thanks for this information.
I'm afraid currently I haven't this corrupted database anymore.
I will do this in the next time when this happen again.

@firebird-automations
Copy link
Collaborator Author

Modified by: Sean Leyne (seanleyne)

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

resolution: Cannot Reproduce [ 5 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

@firebird-automations
Copy link
Collaborator Author

Commented by: Marcel Portner (mpo)

The gfix -v -full give this result:

Summary of validation errors

    Number of record level errors   : 30
    Number of index page errors     : 12

This is in the firebird.log:

SOHARDRDUW10 Tue Nov 28 11:34:43 2017
Database: C:\DABIS800\D800_DB\D800.FDB
Index 1 is corrupt (record 18701286 have missing entries) in table TITEL (132)

SOHARDRDUW10 Tue Nov 28 11:34:43 2017
Database: C:\DABIS800\D800_DB\D800.FDB
Index 2 is corrupt (record 18701286 have missing entries) in table TITEL (132)

SOHARDRDUW10 Tue Nov 28 11:34:44 2017
Database: C:\DABIS800\D800_DB\D800.FDB
Index 3 is corrupt on page 93838 level 0 at offset 40. File: ..\..\..\src\jrd\validation.cpp, line: 2181
in table TITEL (132)

SOHARDRDUW10 Tue Nov 28 11:34:44 2017
Database: C:\DABIS800\D800_DB\D800.FDB
Index 3 is corrupt (record 2899481 have missing entries) in table TITEL (132)

SOHARDRDUW10 Tue Nov 28 11:34:44 2017
Database: C:\DABIS800\D800_DB\D800.FDB
Index 5 is corrupt (record 18701286 have missing entries) in table TITEL (132)

SOHARDRDUW10 Tue Nov 28 11:34:44 2017
Database: C:\DABIS800\D800_DB\D800.FDB
Index 7 is corrupt (record 18701286 have missing entries) in table TITEL (132)

SOHARDRDUW10 Tue Nov 28 11:34:45 2017
Database: C:\DABIS800\D800_DB\D800.FDB
Index 8 is corrupt (record 18701286 have missing entries) in table TITEL (132)

SOHARDRDUW10 Tue Nov 28 11:34:45 2017
Database: C:\DABIS800\D800_DB\D800.FDB
Index 12 is corrupt (record 18701286 have missing entries) in table TITEL (132)

SOHARDRDUW10 Tue Nov 28 11:34:45 2017
Database: C:\DABIS800\D800_DB\D800.FDB
Index 15 is corrupt (record 18701286 have missing entries) in table TITEL (132)

SOHARDRDUW10 Tue Nov 28 11:34:45 2017
Database: C:\DABIS800\D800_DB\D800.FDB
Index 16 is corrupt (record 18701286 have missing entries) in table TITEL (132)

SOHARDRDUW10 Tue Nov 28 11:34:46 2017
Database: C:\DABIS800\D800_DB\D800.FDB
Index 18 is corrupt (record 18701286 have missing entries) in table TITEL (132)

SOHARDRDUW10 Tue Nov 28 11:34:46 2017
Database: C:\DABIS800\D800_DB\D800.FDB
Index 22 is corrupt (record 18701286 have missing entries) in table TITEL (132)

SOHARDRDUW10 Tue Nov 28 11:34:46 2017
Database: C:\DABIS800\D800_DB\D800.FDB
Relation has 41 orphan backversions (257 in use) in table TITEL (132)

And the gstat -h give this result:

Database "C:\dabis800\d800_db\d800.fdb"
Database header page information:
Flags 0
Checksum 12345
Generation 98357682
Page size 16384
ODS version 11.2
Oldest transaction 97774510
Oldest active 97900104
Oldest snapshot 97900104
Next transaction 97900104
Bumped transaction 1
Sequence number 0
Next attachment ID 443186
Implementation ID 26
Shadow count 0
Page buffers 0
Next header page 0
Database dialect 1
Creation date Nov 17, 2017 21:00:48
Attributes force write, multi-user maintenance

Variable header data:
    Sweep interval:         20000
    \*END\*

I hope this info will help you to find the index problem.

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

You need to rebuild every index with missing entries.
Also, you need to find a reason why database is corrupted.
Most probably there was incorrect shutdown of Firebird process.
Also, it seems strange that database is in multy-user shutdown mode.

@firebird-automations
Copy link
Collaborator Author

Modified by: Sean Leyne (seanleyne)

Link: This issue is duplicated by CORE5672 [ CORE5672 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: No test => Cannot be tested

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

1 participant