DB_SEQUENCE->stat |
#include <db.h>int DB_SEQUENCE->stat(DB_SEQUENCE *db, void *sp, u_int32_t flags);
int DB_SEQUENCE->stat_print(DB_SEQUENCE *db, u_int32_t flags);
The DB_SEQUENCE->stat method creates a statistical structure and copies a pointer to it into user-specified memory locations. Specifically, if sp is non-NULL, a pointer to the statistics for the database are copied into the memory location to which it refers.
Statistical structures are stored in allocated memory. If application-specific allocation routines have been declared (see DB_ENV->set_alloc for more information), they are used to allocate the memory; otherwise, the standard C library malloc(3) is used. The caller is responsible for deallocating the memory. To deallocate the memory, free the memory reference; references inside the returned memory need not be individually freed.
In the presence of multiple threads or processes accessing an active sequence, the information returned by DB_SEQUENCE->stat may be out-of-date.
The DB_SEQUENCE->stat method cannot be transaction-protected. For this reason, it should be called in a thread of control that has no open cursors or active transactions.
The statistics are stored in a structure of type DB_SEQUENCE_STAT. The following fields will be filled in:
The DB_SEQUENCE->stat_print method returns a non-zero error value on failure and 0 on success.
The DB_SEQUENCE->stat_print method prints diagnostic information to the output channel described by the DB_ENV->set_msgfile method.
Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.