Ticket #48252 - db2index creates index entry from deleted records
Bug Description: When an entry is deleted, its indexed attribute values
are also removed from each index file. But if the entry is turned to be
a tombstone entry, reindexing adds the removed attribute value back to
the index file.
Fix Description: In the reindexing function ldbm_back_ldbm2index, if the
entry is a tombstone entry, it skips reindexing operation unless the target
attribute is entryrdn or objectclass. If it is reindexing the objectclass,
it indexes just for the key "=nstombstone".
https://fedorahosted.org/389/ticket/48252
Reviewed by mreynolds@redhat.com and rmeggins@redhat.com (Thank you, Mark and Rich!!)
(cherry picked from commit ca4d38dff3bd820af2bf60c9bcc82fd64aac2556)
(cherry picked from commit 86b96278871d8b08f7c6a75379935c2183f6668f)
(cherry picked from commit ef0a2954cba650364ba4c48038d69731ebe19387)
Note: This patch contains the memory leak fixes.
(commit 4277f2ba4f1bb24efc771ea0fa02354654db255c)
(commit 8c9c2fcb14843089a7b5abd02ab1738249b64516)
(commit f10e2e633ad9c55bc2b42bceef3f9635d7ac5b7c)
(cherry picked from commit 6a1f2f0977ef04dc06b13c7efa3fd35e8f858eab)