- Implement DS_Index_Check_I() & DS_Index_Info_Print_I API,
- Implement in dsbench: Index_List_SubType_Set, Index_Tree_SubType_Set, Index_Info_Print & Index_Value_Break commands, - Add in DS_Value_Find dsbench command the repeat arg.
This commit is contained in:
@@ -1635,6 +1635,39 @@ DST_Status DS_Index_Close_I( DST_Root *Root_Ptr, NDT_Index_Id Index_Id)
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Check & repare a data structure index: */
|
||||
/* - Check & fix node links */
|
||||
/* - Update data structure statistics */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* (I) Root_Ptr: Data structure pointer */
|
||||
/* (I) Index_Id: Id of the index */
|
||||
/* (O) Error_Dectected_Nb_Ptr: Number of error detected pointer */
|
||||
/* (O) Error_Corrected_Nb_Ptr: Number of error corected pointer */
|
||||
/* (I) Out: Output stream */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
DST_Status DS_Index_Check_I( DST_Root *Root_Ptr, NDT_Index_Id Index_Id, int *Error_Dectected_Nb_Ptr, int *Error_Corrected_Nb_Ptr, FILE *Out)
|
||||
{
|
||||
NDT_Status nd_status;
|
||||
|
||||
|
||||
if( ( nd_status = ND_Index_Check_I( &( Root_Ptr->ND_Root), Index_Id, Error_Dectected_Nb_Ptr, Error_Corrected_Nb_Ptr, Out)) != NDS_OK)
|
||||
{
|
||||
LG_LOG_ERROR_2( "Unable to convert index: (%d), status: (%d)", Index_Id, nd_status);
|
||||
|
||||
return( DSS_KO);
|
||||
}
|
||||
else
|
||||
{
|
||||
return( DSS_OK);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Convert a data structure index to another type */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
@@ -1694,6 +1727,38 @@ DST_Status DS_Index_Reorg_I( DST_Root *Root_Ptr, NDT_Index_Id Index_Id)
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Print data structure index information */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* (I) Stream: Output stream */
|
||||
/* (I) Root_Ptr: Data structure pointer */
|
||||
/* (I) Index_Id: Id of the index */
|
||||
/* (I) Recursive_Mode: Child or Parent */
|
||||
/* (I) Recursive_Depth: Curent recursion depth */
|
||||
/* (I) Recursive_Offset: Curent print out offset */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
DST_Status DS_Index_Info_Print_I( FILE *Out, DST_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Recursive_Mode Recursive_Mode, NDT_Recursive_Depth Recursive_Depth, NDT_Recursive_Offset Recursive_Offset)
|
||||
{
|
||||
NDT_Status nd_status;
|
||||
|
||||
|
||||
if( ( nd_status = ND_Index_Info_Print( Out, &( Root_Ptr->ND_Root), Index_Id, Recursive_Mode, Recursive_Depth, Recursive_Offset)) != NDS_OK)
|
||||
{
|
||||
LG_LOG_ERROR_1( "Unable to print info about the data structure: (%d)", nd_status);
|
||||
|
||||
return( DSS_KO);
|
||||
}
|
||||
else
|
||||
{
|
||||
return( DSS_OK);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Récupération du premier noeud d'une structure */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user