db_env_create

APIRef

#include <db.h>

int db_env_create(DB_ENV **dbenvp, u_int32_t flags);

Description

The db_env_create function creates a DB_ENV structure which is the handle for a Berkeley DB environment. A pointer to this structure is returned in the memory referenced by dbenvp.

The flags parameter is currently unused, and must be set to 0.

The db_env_create function returns a non-zero error value on failure and 0 on success.

Errors

If a fatal error occurs in Berkeley DB, the db_env_create function will fail and return DB_RUNRECOVERY, at which point all subsequent database calls will fail in the same way.

In addition, the db_env_create function may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions.

See Also

DBENV->close, db_env_create, DBENV->open, DBENV->remove, DBENV->err, db_strerror, db_version, DBENV->set_cachesize, DBENV->set_errcall, DBENV->set_errfile, DBENV->set_errpfx, DBENV->set_mutexlocks, DBENV->set_pageyield, DBENV->set_paniccall, DBENV->set_region_init and DBENV->set_verbose.

APIRef

Copyright Sleepycat Software