DB_MPOOLFILE->set_flags()
#include <db.h>
int
DB_MPOOLFILE->set_flags(DB_MPOOLFILE *mpf, u_int32_t flags, int onoff) Configure a file in the cache.
To set the flags for a particular database, call the DB_MPOOLFILE->set_flags() method using the DB_MPOOLFILE handle stored in the mpf field of the DB handle.
The DB_MPOOLFILE->set_flags() method returns a non-zero error value on failure and 0 on success.
Parameters
flags
The flags parameter must be set by bitwise inclusively OR'ing together one or more of the following values:
DB_MPOOL_NOFILEIf set, no backing temporary file will be opened for the specified in-memory database, even if it expands to fill the entire cache. Attempts to create new database pages after the cache has been filled will fail.
The
DB_MPOOL_NOFILEflag configures a file in the cache, not only operations performed using the specified DB_MPOOLFILE handle.The
DB_MPOOL_NOFILEflag may be used to configure Berkeley DB at any time during the life of the application.DB_MPOOL_UNLINKIf set, remove the file when the last reference to it is closed.
The
DB_MPOOL_ULINKflag configures a file in the cache, not only operations performed using the specified DB_MPOOLFILE handle.The
DB_MPOOL_ULINKflag may be used to configure Berkeley DB at any time during the life of the application.
onoff
If onoff is zero, the specified flags are cleared; otherwise they are set.