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

void cbd500_Tree::bd520LeafCountPropagation ( tsp00_KeyPtr  pKey = NULL,
tsp00_Int4  KeyLen = 0 
)

function: bd520LeafCountPropagation description: This propagates the LeafCount from the LeafNode to the root.

The LeafNode is specified by the Key. arguments: Key [in] specifies the Leaf

Definition at line 120 of file vbd520.cpp.

References cbd300_InvCurrentBasis::bd300LockTreeExclusive(), bd500FindNode(), bd500PropagationNeeded(), cbd600_Node::bd600Release(), cbd600_Node::m_Current, and cbd600_Node::m_RequestKind.

{
    ROUTINE_DBG_MEO00 ("bd520LeafCountPropagation");

    cbd501_IndexOrders NewOrders;

    if ( NULL != pKey )
    {
        m_Node.bd600Release (nr_for_update == m_Node.m_RequestKind);
        if ( m_Node.m_Current.bd300LockTreeExclusive() )
            if ( g01vtrace.vtrAll_gg00 || g01vtrace.vtrBdIndex_gg00 )
                bd500_WriteTrace("bd520LeafCountPropagation",25);
        if (m_TrError != e_ok) return;
        bd500FindNode (pKey, KeyLen, LEAF_LEVEL_BD00);
        if (m_TrError != e_ok) return;
    }
    else
    {
        /* if pKey is NULL m_Node is the correct LeafNode       */
        /* and the tree is locked correctly                     */
        /* but it has to be checked, if any action is necessary */

        if ( ! bd500PropagationNeeded() ) return;
    }

    bd520_Propagate (! UPDATE_KEY, NewOrders);
    if ( NewOrders.iosOrderCount_bd501 > 0 )
    {
        tsp00_Int4 DummyNumNodeDiff;
        bd510_ExcuteOrdersOnOneLevel (NewOrders, DummyNumNodeDiff);
    }
}


Generated by  Doxygen 1.6.0   Back to index