This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: bsddb._openDBEnv() should not touch current directory
Type: behavior Stage: resolved
Components: Extension Modules Versions: Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: fweimer, jcea
Priority: normal Keywords:

Created on 2013-03-04 10:47 by fweimer, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg183430 - (view) Author: Florian Weimer (fweimer) Date: 2013-03-04 10:47
This code:

def _openDBEnv(cachesize):
    e = db.DBEnv()
    if cachesize is not None:
        if cachesize >= 20480:
            e.set_cachesize(0, cachesize)
        else:
            raise error, "cachesize must be >= 20480"
    e.set_lk_detect(db.DB_LOCK_DEFAULT)
    e.open('.', db.DB_PRIVATE | db.DB_CREATE | db.DB_THREAD | db.DB_INIT_LOCK | db.DB_INIT_MPOOL)
    return e

causes Berkeley DB to read the DB_CONFIG file from the current directory, which may have unexpected side effects.  Unfortunately, Berkeley DB still reads ./DB_CONFIG even if the first argument to DBEnv.open() is None/NULL, so the only way to suppress this behavior seems a non-existing or known-to-by-empty directory (such as "/var/empty").
msg183432 - (view) Author: Jesús Cea Avión (jcea) * (Python committer) Date: 2013-03-04 11:38
This is a standard Berkeley DB behavior. Can I suggest you to report this "issue" to Oracle forums?

http://docs.oracle.com/cd/E17276_01/html/programmer_reference/env_db_config.html

https://forums.oracle.com/forums/forum.jspa?forumID=271

Closing as "invalid". if you disagree, please reopen.
History
Date User Action Args
2022-04-11 14:57:42adminsetgithub: 61549
2013-03-04 11:38:37jceasetstatus: open -> closed

nosy: + jcea
messages: + msg183432

resolution: not a bug
stage: resolved
2013-03-04 10:47:56fweimercreate