How to determine the exact reason why berkeley db returns EINVAL to db-> open?

Berkeley db documentation states that the reasons may be as follows:

An invalid flag value or parameter is specified (for example, an unknown database type, page size, hash function, byte byte, byte order) or a flag value or parameter that is not compatible 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 for DB-> open, but was not specified for calling DB_ENV-> for the environment in which the DB descriptor was created.

A supporting flat text file was specified either using the DB_THREAD flag, or the provided database environment supports transaction processing.

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

I want to know the exact reason leading to EINVAL, but I did not find the details configuration that could help me in the "DB" structure (in DB_ENV they have the set_verbose method, but I do not use DB_ENV)

+5
source share
1 answer

You can give DB-> err () and try these examples . If I remember correctly, there was an environment variable (a shell environment variable that you can export X=Y) that can be set, and the library will start printing error messages in stderr, but maybe it was a DB Env thing ... sorry, I can’t find information now.

0
source

All Articles