CRUMV *CRUCache::FetchSingleNonInvolvedMV(CDDMV *pddMV) { // Create a new wrapper object for a non-involved MV, // leave its reference list empty CRUMV *pMV = new CRUMV(pddMV); mvList_.AddTail(pMV); // Fetch the epoch data pMV->FetchMetadata(); return pMV; }
void CRUCache::FetchSingleInvolvedMV(CDDMV *pddMV) { CRUMV *pMV = new CRUMV(pddMV); pMV->SetInvolved(); // Read the REFRESH-specific metadata pMV->FetchMetadata(); // Take care not to cancel the dangling DDL lock accidentally. // For example, if the MV is multi-transactional, and has a // DDL lock following the previous Refresh failure - it is // forbidden to remove the DDL lock as long as the MV is not // refreshed successfully. pMV->SetReleaseDDLLock(pddMV->CanCancelDDLLock()); // Ignore User Maintainable MVs. if (CDDObject::eBY_USER == pMV->GetRefreshType()) { delete pMV; return; } mvList_.AddTail(pMV); // Register the MV for the further DDL lock handling ddlLockHandler_.AddObject(pMV); if (TRUE == isCancelOnly_) { return; } // Retrieve whether the user has Insert/Select/Delete privilege for this MV pMV->FetchPrivileges(); }