エラーコードポータル
SQLiteSQLiteエラーコード

SQLITE_READONLY_CANTINIT

readonly cantinit

別表記: 1288

コード SQLITE_READONLY_CANTINIT · SQLiteが報告した問題です。

SQLITE_READONLY_CANTINIT 結果コードは、VFS の xShmMap メソッドに由来し、WAL モードで使用される共有メモリ領域が存在するが、現在のプロセスが共有メモリ領域に対する書き込み権限を持っていないため、その内容が信頼できず、現在のプロセスで使用できないことを示します。 (WAL モードの共有メモリ領域は、通常、プロセス空間に mmap される「-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.

トラブルシューティング・診断リンク

まず、文書の製品・バージョン・発生環境が現在の状況と一致しているか確認してください。

この項目には公式のコード参考文書のみを掲載しています。個別の解決手順は検証していません。