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

void Log_Transaction::BeginSubtrans (  ) 

This begins a sub transaction.

A sub transaction can be separately rollbacked. trSubtransNo becomes a new Subtransno.

Definition at line 493 of file Log_Transaction.cpp.

References GetTransState(), IsInitialized(), Log_Transaction::Persistent::LastRedoEntrySequence, Log_Transaction::Persistent::LastUndoEntrySequence, LogTrans_Trace, m_Context, m_MaxSubtransNo, m_pSubtransStack, m_pTrans, opened, Container_Stack< T >::Push(), Log_Transaction::SubtransStackElem::RedoStopSequence, Log_Transaction::SubtransStackElem::SubtransNo, and Log_Transaction::SubtransStackElem::UndoStopSequence.

Referenced by Table_Table::Create().

{
    SAPDBTRACE_METHOD_DEBUG ("Log_Transaction::BeginSubtrans", LogTrans_Trace, 5);
    
    SAPDBERR_ASSERT_STATE ( IsInitialized() );
    SAPDBERR_ASSERT_STATE ( opened == GetTransState() );
    
    ++m_MaxSubtransNo;
    m_pTrans->trSubtransId_gg00 = m_MaxSubtransNo;

    SubtransStackElem NewElem;
    NewElem.SubtransNo       = m_pTrans->trSubtransId_gg00;
    NewElem.UndoStopSequence = m_Context.LastUndoEntrySequence + 1;
    NewElem.RedoStopSequence = m_Context.LastRedoEntrySequence + 1;

    if ( ! m_pSubtransStack->Push(NewElem) )
    {
        RTE_Crash( SAPDBErr_Exception(__FILE__, __LINE__,
                                      SAPDBERR_ASSERT_STATE_FAILED,
                                      "BeginSubtrans:Push failed") );
    }
    SAPDBTRACE_WRITELN (LogTrans_Trace, 6, "NewSubtransNo: " << NewElem.SubtransNo << \
                        ", UndoStopSeq: " << NewElem.UndoStopSequence << \
                        ", RedoStopSeq: " << NewElem.RedoStopSequence);
}


Generated by  Doxygen 1.6.0   Back to index