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

bool cbd500_Tree::bd520LeafOverflow ( tsp00_KeyPtr  pKey,
tsp00_Int4  KeyLen,
bool  bInsNewRecord,
tsp00_Int4  RequiredLen,
tsp00_Int4 &  RecIndex 

function: bd520LeafOverflow description: This creates space for a new or existing record.

Records might be moved to right or left neighbor nodes. New nodes are inserted if necessary. In addition the reorganization of the above IndexNodes is triggered. POST: The internal node includes the new ore updated record-space and RecIndex points to this place. The PathInfo is invalid. return value: bool - true, if anything was done arguments: Key [in] of the new or updated record InsNewRecord [in] wether the record is new or updated RequiredLen [in] the total(new) or additional(update) length RecIndex [in/out]

Definition at line 214 of file vbd520.cpp.

References bd500Print(), and cbd600_Node::m_Current.

Referenced by cbd400_InvTree::bd400AppendPrimKey(), bd530AddRecordSpace(), bd530AppendRecordSpace(), and bd530UpdRecordSpace().

    ROUTINE_DBG_MEO00 ("bd520LeafOverflow");
    cbd501_IndexOrders NewOrders; 
    tsp00_Int4         NumNodeDiff = 0;
    cbd600_Node        Neighbor (m_Node.m_Current, tbd_node_request::fromConst (nr_for_update));
    cbd600_Node        NextNeighbor (m_Node.m_Current, tbd_node_request::fromConst (nr_for_update));
    bool               bOrdersExisting; /* PTS 1106992 UH 2000-06-21 */

    /* PTS 1106992 UH 2000-06-21 */
    /* the return value was added */
    if ( g01vtrace.vtrAll_gg00 && g01glob.treecheck )
        bd500Print ("bd520LeafOverFlow"); // PTS 1112713 UH 2001-12-07

    bd520_Overflow (Neighbor, NextNeighbor, pKey, KeyLen, 0,
        bInsNewRecord, false, RequiredLen, RecIndex, NumNodeDiff, NewOrders);

    bOrdersExisting = NewOrders.iosOrderCount_bd501 > 0;

    if (e_ok != m_TrError) return bOrdersExisting;
    m_Node.m_Current.currNumLeaves_bd00 += NumNodeDiff;
    if ( bOrdersExisting )
        bd510_ExcuteOrdersOnOneLevel (NewOrders, NumNodeDiff);
    m_CurrLevel = LEAF_LEVEL_BD00;

    if ( e_ok != m_TrError ) t01basis_error (bd_index, "m_TrError   ", m_TrError);
#   endif
    return bOrdersExisting;

Generated by  Doxygen 1.6.0   Back to index