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

bool Log_Transaction::EndSubtrans (  ) 

This ends a sub transaction.

Returns:
false, if subtrans begin is missing.

Definition at line 520 of file Log_Transaction.cpp.

References GetTransState(), Container_Stack< T >::IsEmpty(), IsInitialized(), LOG_NIL_SUBTRANS_NO, LogTrans_Trace, m_pSubtransStack, m_pTrans, opened, Container_Stack< T >::Pop(), Container_Stack< T >::Top(), and void().

Referenced by Table_Table::Create(), and Rollback().

{
    SAPDBTRACE_METHOD_DEBUG ("Log_Transaction::EndSubtrans", LogTrans_Trace, 5);

    SAPDBERR_ASSERT_STATE ( IsInitialized() );
    SAPDBERR_ASSERT_STATE ( opened == GetTransState() );

    if ( m_pSubtransStack->IsEmpty() )
    {
        return false;
    }

    SAPDBTRACE_WRITELN (LogTrans_Trace, 6, "OldSubtransNo: " << m_pSubtransStack->Top().SubtransNo << \
                        ", UndoStopSeq: " << m_pSubtransStack->Top().UndoStopSequence << \
                        ", RedoStopSeq: " << m_pSubtransStack->Top().RedoStopSequence);

    (void)m_pSubtransStack->Pop();

    if ( m_pSubtransStack->IsEmpty() )
    {
        // ++ until temp logging is written new
        // m_MaxSubtransNo             = LOG_NIL_SUBTRANS_NO;
        m_pTrans->trSubtransId_gg00 = LOG_NIL_SUBTRANS_NO;
    }
    else
        m_pTrans->trSubtransId_gg00 = m_pSubtransStack->Top().SubtransNo;

    SAPDBTRACE_WRITELN (LogTrans_Trace, 6, "NewSubtransNo: " << m_pTrans->trSubtransId_gg00);
    
    return true;
}


Generated by  Doxygen 1.6.0   Back to index