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 plan query navigating on a descending index [CORE5226] #5506

Closed
firebird-issue-importer opened this issue May 1, 2016 · 5 comments

Comments

@firebird-issue-importer
Copy link

firebird-issue-importer commented May 1, 2016

Submitted by: Boltik Evgeny (bolt)

It happens only if the index key was removed (concurrently or by the cooperative GC) after reading it but before validating it using the fetched record. Only DESC indices are affected, the issue also depends on index key values. The bug seems to be inherited from InterBase.

Simplified example (leaf page layout):

key A, length 23, points to record 120006 (old version to be GCed)
key B, length 22, points to record 119054
key C, length 22, points to record 119535
key D, length 22, points to record 120006 (last committed version)

Key A gets GCed while reading and disappears, but key B is skipped and only records for C and D are returned. The second execution (with no GC involved) correctly returns {B, C, D}. The issue manifests itself only if key B has all its 22 bytes equal to key A (which is one byte longer).

Commits: e8bd26a 16e356f 3b7b316

====== Test Details ======

Waiting for suggest how to implement this test, letter to/from dimitr 06-may-2016 22:51.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented May 1, 2016

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented May 1, 2016

Modified by: @dyemanov

reporter: Dmitry Yemanov [ dimitr ] => Boltik Evgeny [ bolt ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented May 6, 2016

Modified by: @dyemanov

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

resolution: Fixed [ 1 ]

Fix Version: 2.5.6 [ 10721 ]

Fix Version: 3.0.1 [ 10730 ]

Fix Version: 4.0 Alpha 1 [ 10731 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented May 7, 2016

Modified by: @pavel-zotov

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

QA Status: No test => Deferred

Test Details: Waiting for suggest how to implement this test, letter to/from dimitr 06-may-2016 22:51.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented May 8, 2016

Commented by: Boltik Evgeny (bolt)

I tested.
everything works on Firebird-3.0.1.32510-0_Win32.

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