DB_ENV->open(3)

NAME
DB_ENV->open

SYNOPSIS

#include <db.h>

int DB_ENV->open(DB_ENV *dbenv, char *db_home, u_int32_t flags int mode);

DESCRIPTION
Open a TokuDB environment (which should previously have been created using db_env_create, and which should eventually be closed using DB_env->close().

PARAMETERS

dbenv
    The environment.

db_home
    The name of the environment's directory if non-NULL. Can be either a relative pathame (relative to the current working directory), or an absolute pathname. If db_home is NULL and the DB_USE_ENVIRON or DB_USE_ENVIRON_ROOT flag is set, then the value of the DB_HOME environment variable is used.

flags
    The flags parameter must be set to 0 or the bitwise or of one or more of the following values:

DB_INIT_LOCK

DB_INIT_LOG

DB_INIT_MPOOL

DB_INIT_TXN

DB_RECOVER

DB_RECOVER_FATAL

DB_USE_ENVIRON

DB_USE_ENVIRON_ROOT

DB_CREATE

DB_PRIVATE

DB_THREAD
    If DB_THREAD is specified, then DB_CREATE must also be specified, even if the environment already exists. This restriction is in place in Berkeley DB 4.6 and 4.7, and so TokuDB also enforces it for compatibility.

RETURN VALUE

Returns zero on success, and nonzero on failure.

CONFORMING TO
The TokuDB embedded database provides a subset of the functionality of the Berkeley DB. Programs that work with TokuDB probably work with with most versions of Berkeley DB with only recompilation or relinking. The database files are incompatible, however, so to convert from one library to the other you would need to dump the database with one library's tool and load it with the other's.

AUTHOR
Tokutek, Inc.

COPYRIGHT
Copyright (c) 2007 Tokutek. All Rights Reserved.