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

void cbd520_Separator::bd520Check ( cbd300_InvCurrentBasis  Current  )  [inline]

function: bd520Check description: Check if the separator points to the right node and LeafCount is valid. arguments: Current [in/out] to set the TrError and get a page.

endclass: cbd520_Separator

Definition at line 169 of file gbd520.h.

References bd520KeyLen(), bd520KeyPtr(), bd520LeafCount(), bd520Print(), bd520SubNodeId(), cbd600_Node::bd600Dump(), cbd600_Node::bd600IsLeaf(), cbd600_Node::bd600LeafCount(), cbd600_Node::bd600Move(), cbd600_Node::bd600NumRecords(), and cbd600_Node::bd600RecPtr().

{
    tgg00_BasisError  &TrError = Current.curr_trans->trError_gg00;
    cbd600_Node        SubNode (Current, tbd_node_request::fromConst (nr_for_read));    
    tsp00_LcompResult  Lresult;
    tgg00_RecPtr       pFirstRec;

    
    SubNode.bd600Move(bd520SubNodeId());
    if ( e_ok != TrError ) return;;
    
    if ( (bd520KeyLen() > 0)
         && 
         ((SubNode.bd600NumRecords() > 0) || ! SubNode.bd600IsLeaf()) )
    {
        pFirstRec = SubNode.bd600RecPtr(FIRST_REC_INDEX_BD00);
        
        s30cmp (bd520KeyPtr(), POS_OFF_DIFF_BD00, bd520KeyLen(),
            pFirstRec, POS_OFF_DIFF_BD00+cgg_rec_key_offset,
            bd520KeyLen(), Lresult);
        
        if (  (Lresult == l_greater) ||
             ((Lresult != l_equal) && ! SubNode.bd600IsLeaf()) )
        {
#           if COMPILEMODE_MEO00 >= SLOW_MEO00 
            bd520Print();
            t01sname   (bd_index, "FirstKey:   ");
            t01moveobj (bd_index, pFirstRec, POS_OFF_DIFF_BD00+cgg_rec_key_offset,
                POS_OFF_DIFF_BD00+cgg_rec_key_offset+ bd520KeyLen());
#           endif
            TrError = e_invalid_index_structure;
            SubNode.bd600Dump (csp3_bd_msg, "bd520CheckSepKeys  Sn  ");
        }
        
    }

    if (! SubNode.bd600IsLeaf() // If subtrees are there, then propagation will happen at a later time
        &&
        bd520LeafCount() != SubNode.bd600LeafCount() )
    {
        TrError = e_invalid_index_structure;
        SubNode.bd600Dump (csp3_bd_msg, "bd520CheckIndex:LeafC Sn");
    }
}


Generated by  Doxygen 1.6.0   Back to index