#include <db.h> int DB_ENV->set_data_len(DB_ENV *dbenv, u_int32_t bytes);
Limits the amount of data displayed when
DB_ENV->lock_stat_print()
is called with the DB_STAT_ALL
or
DB_STAT_LOCK_OBJECTS
flag.
This method is explicitly called in the db_printlog and db_dump utilities when using the -D command line option. When used in this manner it will set the maximum number of bytes to display for each key/data item. These utilities run in their own environment context.
If you want to call this method from the primary application and have it set the maximum number of bytes to display for each key/data item, then you must bring the db_dump/db_printlog code into the primary application and ensure that the same environment handle is used throughout.
This limit may also be configured using the environment's DB_CONFIG file. In this case, the limit will equally affect your application code, as well as the command line utilities noted above without modification to their code. The syntax of the entry in that file is a single line with the string "set_data_len", one or more whitespace characters, and the limit in bytes that you want to set.
The DB_ENV->set_data_len()
method
configures operations performed using the specified
DB_ENV handle, not all operations
performed on the underlying database environment.
The DB_ENV->set_data_len()
method may be
called at any time during the life of the application.
The DB_ENV->set_data_len()
method returns a non-zero error value on failure and 0 on success.