ok_exit = false;
try
{
// "open" the btree, using recovery's already opened container
OpenBTree open_btree = new OpenBTree();
open_btree.init(
(TransactionManager) null, // current user xact - not needed
(TransactionManager) null, // current xact - not needed
pageOp.getContainer(), // recovery already opened container
rawtran,
false,
ContainerHandle.MODE_FORUPDATE,
// open_mode not used - container is
// already opened.
TransactionManager.MODE_NONE,
(BTreeLockingPolicy) null, // don't get locks during undo
btree,
(LogicalUndo) null, // no logical undo necessary, as
// this code only does read.
(DynamicCompiledOpenConglomInfo) null);
// System.out.println(
// "calling logical undo, recordhandle = " + rechandle);
// System.out.println("calling logical undo, record= " +
// logged_index_row_template);
// Get the page where the record was originally, before splits
// could have possibly moved it.
control_row = ControlRow.Get(open_btree, rechandle.getPageNumber());
// init compare_result, if record doesn't exist do the search
compare_result = 1;
if (control_row.getPage().recordExists(rechandle, true))
{
if (SanityManager.DEBUG)
{
SanityManager.ASSERT(
control_row.getPage().fetchNumFields(rechandle) ==
logged_index_row_template.length);
}
// create template for the page index row from the conglomerate.
RecordHandle ret_rechandle =
control_row.getPage().fetchFromSlot(
(RecordHandle) null,
control_row.getPage().getSlotNumber(rechandle),
template,
(FetchDescriptor) null,
true);
// compare the 2 rows, and if they are the same then the raw
// store has the right page and record and there is no work to
// be done (this is usual case).
compare_result = ControlRow.CompareIndexRowToKey(
template, logged_index_row_template,
logged_index_row_template.length, 1,
open_btree.getColumnSortOrderInfo());
}
if (compare_result == 0)
{
ret_page = control_row.getPage();