How to determine the exact reason, why does berkeley db return EINVAL on db->open?

220 Views Asked by At

In the berkeley db documentation, it is stated that the reasons may be the following:

An invalid flag value or parameter was specified (for example, unknown database type, page size, hash function, pad byte, byte order) or a flag value or parameter that is incompatible with the specified database. The DB_THREAD flag was specified and fast mutexes are not available for this architecture.

The DB_THREAD flag was specified to DB->open, but was not specified to the DB_ENV->open call for the environment in which the DB handle was created.

A backing flat text file was specified with either the DB_THREAD flag or the provided database environment supports transaction processing.

The only flag I use is DB_CREATE, database type is DB_BTREE.

I want to know the exact reason that lead to EINVAL, but I didn't find any verbosity configuration that could help me within "DB" structure (in DB_ENV, they have set_verbose method, but I don't use DB_ENV).

1

There are 1 best solutions below

0
On

You may give DB->err() and these examples a try. If I remember correctly there was an environment variable (shell environment variable you can export X=Y) one can set and the library would start printing error messages to stderr, but it may have been the DB Env thing... sorry, can't find the info now.