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

void cbd500_Tree::bd500FindBranch ( cbd600_Node Node,
tsp00_KeyPtr  pSepKey,
tsp00_Int4  SepKeyLen,
tsp00_Int4 &  SepRecIndex 
) [static]

function: bd500FindBranch description: Determine the correct Separator in an index node with a given Key. arguments: Node [in] SepKey [in] SepRecIndex [out]

Definition at line 132 of file vbd500.cpp.

References cbd600_Node::bd600RecPtr(), cbd600_Node::bd600SearchRecord(), and cbd600_Node::m_TrError.

Referenced by bd500_FindBranch().

{
    ROUTINE_DBG_MEO00 ("bd500FindBranch");

    tbd_searchresult SearchResult;

    SearchResult.becomes (nonefound);

    Node.bd600SearchRecord (pSepKey, SepKeyLen, SepRecIndex, SearchResult);
    if ( e_ok != Node.m_TrError ) return;

    switch (SearchResult)
    {
    case thisfound: break;         // separator found
    case nextfound: --SepRecIndex; // separator found
                    break;
    case lastfound: break;         // separator found
    case nonefound: break;         // impossible
    default:        break;         // impossible
    }

    if (SepRecIndex < FIRST_REC_INDEX_BD00)
    {
        Node.m_TrError = e_invalid_index_structure;
        return;
    }
                        
    if (Node.bd600RecPtr(SepRecIndex)->recLen_gg00() > sizeof (tbd00_Separator))
    {
        Node.m_TrError = e_illegal_branchlength;
    }
        return;
}


Generated by  Doxygen 1.6.0   Back to index