Issue Details (XML | Word | Printable)

Key: CORE-405
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vlad Khorsun
Reporter: Dmitry Yemanov
Votes: 0
Watchers: 1

If you were logged in you would be able to see more operations.
Firebird Core

Garbage vs indices/constraints

Created: 27/May/03 12:00 AM   Updated: 18/Mar/18 10:59 PM
Component/s: Engine
Affects Version/s: None
Fix Version/s: 3.0.4, 4.0 Beta 1

SF_ID: 744175
QA Status: Done successfully
Test Details: NOTE: 4.0 was not affected (no error occured during test)

 Description  « Hide
SFID: 744175#
Submitted By: dimitr

If an index contains garbage and automatic GC
is disabled, then it's impossible to create unique
indices or PK/UK/FK constraints.

For example:

1) attach with isc_dpb_no_garbage_collect

2) insert some duplicate data



3) delete these rows


4) create unique index


You'll see "attempt to store duplicate value ..."
error message, which is incorrect in this case.

Since indices work outside transaction control, it
may be a initial design/implementation pitfall. It
appears the index creation and partner lookup
code never touches records and hence is unable
to determine which versions are actual at the
moment of index creation.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Dmitry Yemanov added a comment - 16/Jul/06 07:39 PM
I think this issue should be treated as a design pitfall.

Pavel Cisar added a comment - 16/Jul/06 10:52 PM
I think that while it's "as designed" pitfall, it's an issue that could really puzzle Firebird users, so it should be documented (it's not documented anywhere, as far as I know). I worry that if we'll close this issue, we will forget to do so. Hence I'd like suggest to reopen it and move it to Documnetation project, or better clone it to new task for Documentation project and close this one. What do you think?

Dmitry Yemanov added a comment - 16/Jul/06 11:09 PM
I agree that it should be documented. Very few people use GC disabled in development, but they should be warned about the possible side effects anyway.