Logo Search packages:      
Sourcecode: maxdb-7.5.00 version File versions

void Log_HistoryDirectory::MigratePageType ( tgg00_TransContext &  trans  ) 

-------------------------------------------------------------------------------- function: MigratePageType arguments: trans [in/out] description: For migration of wrong page type. -----------------------------------------------------------------------------

Definition at line 201 of file Log_HistoryDirectory.cpp.

References Data_ChainFixSizeSpace< PAGE >::Begin(), Data_ChainFixSizeSpace< PAGE >::Iterator::GetPageIterator(), Data_BaseFile::GetRootId(), Data_ChainFixSizeSpace< PAGE >::Iterator::Invalidate(), Data_BaseFile::IsCreated(), Data_ChainIterator< T >::IsValid(), LogHistory_Trace, m_Container, m_Iterator, Data_PageId::PageRecoveryMode(), and Data_ChainIterator< T >::Set().

Referenced by Log_History::RestoreHistoryDirectory().

{
    // PTS 1115490 UH 2002-04-29 new
    
    SAPDBTRACE_METHOD_DEBUG ("Log_HistoryDirectory::MigratePageType", LogHistory_Trace, 5);

    if ( ! IsCreated() )
        return;

    m_Container.Begin (m_Iterator, Data_ForRead);
    
    if ( ! m_Iterator.GetPageIterator().IsValid()
         &&
         trans.trError_gg00 == e_inconsistent_nodetype )
    {
        trans.trError_gg00 = e_ok;
        Data_PageAccessManager pam (trans, Data_HistoryFile, Data_PageRecoveryMode(), this->GetRootId().PageNo());
        PageIterator           pageiter (pam);

        if ( ! pageiter.Set ( this->GetRootId().PageNo(),
                              this->GetRootId().PageRecoveryMode(),
                              Data_ForUpdate ) )
            RTE_Crash( SAPDBErr_Exception(__CONTEXT__,SAPDBERR_ASSERT_STATE_FAILED,
                                          "cannot access root") );

        while ( pageiter.IsValid() )
        {
            (*pageiter).ResetPageType2(pt2HistoryDirectory_egg00);
            ++pageiter;
        }
    }
    
    m_Iterator.Invalidate();
}                                            


Generated by  Doxygen 1.6.0   Back to index