Ticket #47463 - IDL-style can become mismatched during partial restoration
Description by telackey:
When doing a partial/FRI restoration the database files are copied
key-by-key. This is necessary to reset the LSNs so the restored
files can merge into the existing DB environment (cf. dblayer_copy_
file_resetlsns()) in a recoverable way.
However, dblayer_copy_file_keybykey() does not set the comparison
function before calling DB->put(), which means that the restored
files will not necessarily be using the proper function.
While all the keys are technically present, indexed searches can
still fail to return relevant results because the key order is
significant when intersecting the results with the other indices.
Note: The bug was reported and the patch was provided by telackey.
(Thank you, Thomas!)
Additional fix by nhosoi:
The entryrdn index uses its special dup compare function. The dup
compare function is set when the restoring index file is entryrdn.
Reviewed by rmeggins (Thank you, Rich!)