错误代码门户
SQLiteSQLite错误代码

SQLITE_READONLY_CANTINIT

readonly cantinit

其他表示形式:1288

代码 SQLITE_READONLY_CANTINIT · SQLite 报告的问题。

SQLITE_READONLY_CANTINIT结果代码源自VFS的xShmMap方法,表示WAL模式使用的共享内存区域存在,但其内容不可靠且无法被当前进程使用,因为当前进程没有对该共享内存区域的写权限。 (WAL模式的共享内存区域通常是一个带有“-wal”后缀的文件,该文件被映射到进程空间。如果当前进程对该文件没有写权限,则无法写入共享内存。) SQLite 中的高层逻辑通常会拦截错误代码并创建一个临时的内存共享内存区域,以便当前进程至少可以读取数据库的内容。该结果代码不应到达应用程序接口层。

Google Translate · 此内容为自动翻译。技术术语及适用条件请以英文原文为准。

The SQLITE_READONLY_CANTINIT result code originates in the xShmMap method of a VFS to indicate that the shared memory region used by WAL mode exists buts its content is unreliable and unusable by the current process since the current process does not have write permission on the shared memory region. (The shared memory region for WAL mode is normally a file with a "-wal" suffix that is mmapped into the process space. If the current process does not have write permission on that file, then it cannot write into shared memory.) Higher level logic within SQLite will normally intercept the error code and create a temporary in-memory shared memory region so that the current process can at least read the content of the database. This result code should not reach the application interface layer.

故障排除与诊断链接

请先确认文档中的产品、版本及发生环境与当前情况一致。

此条目仅链接至官方代码参考文档。尚未验证单独的故障排除步骤。