lockMode,
TransactionController.ISOLATION_SERIALIZABLE,
constants.heapSCOCI,
heapDCOCI);
CursorResultSet rs = insertedRowHolder.getResultSet();
try
{
/*
** We need to do a fetch doing a partial row
** read. We need to shift our 1-based bit
** set to a zero based bit set like the store
** expects.
*/
FormatableBitSet readBitSet = RowUtil.shift(baseRowReadList, 1);
ExecRow deferredTempRow2;
rs.open();
while ((deferredTempRow2 = rs.getNextRow()) != null)
{
/*
** Check the constraint now if we have triggers.
** Otherwise we evaluated them as we read the
** rows in from the source.
*/
if (triggerInfo != null)
{
source.setCurrentRow(deferredTempRow);
evaluateCheckConstraints(checkGM, activation);
}
/*
** The last column is a Ref, which contains a
** RowLocation.
*/
DataValueDescriptor rlColumn = deferredTempRow2.getColumn(numberOfBaseColumns + 1);
RowLocation baseRowLocation =
(RowLocation) (rlColumn).getObject();
/* Get the base row at the given RowLocation */
boolean row_exists =
deferredBaseCC.fetch(
baseRowLocation, deferredSparseRow.getRowArray(),
readBitSet);
if (SanityManager.DEBUG)
{
SanityManager.ASSERT(row_exists, "did not find base row in deferred update");
}
/*
** Copy the columns from the temp row to the base row.
** The base row has fewer columns than the temp row,
** because it doesn't contain the row location.
*/
RowUtil.copyRefColumns(newBaseRow,
deferredTempRow2,
numberOfBaseColumns);
rowChanger.updateRow(deferredBaseRow,
newBaseRow,
baseRowLocation);
}
} finally
{
source.clearCurrentRow();
rs.close();
}
}
}