gpt4 book ai didi

c - 如何确定确切原因,为什么 berkeley db 在 db->open 上返回 EINVAL?

转载 作者:太空狗 更新时间:2023-10-29 15:09:08 25 4
gpt4 key购买 nike

在berkeley db的文档中,说明可能是以下原因:

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.

我使用的唯一标志是 DB_CREATE,数据库类型是 DB_BTREE。

我想知道导致 EINVAL 的确切原因,但我没有在“DB”结构中找到任何可以帮助我的冗长配置(在 DB_EN​​V 中,他们有 set_verbose 方法,但我不使用 DB_EN​​V) .

最佳答案

你可以给DB->err()these examples一试。如果我没记错的话,有一个环境变量(你可以 export X=Y 的 shell 环境变量)可以设置并且库会开始将错误消息打印到 stderr,但这可能是 DB Env 的事情...抱歉,现在找不到信息。

关于c - 如何确定确切原因,为什么 berkeley db 在 db->open 上返回 EINVAL?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10623512/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com