sqlite
差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン前のリビジョン | |||
| sqlite [2022/03/30 02:03] – nullpon | sqlite [2022/07/31 11:32] (現在) – nullpon | ||
|---|---|---|---|
| 行 69: | 行 69: | ||
| ``` | ``` | ||
| + | ## エラー対応 | ||
| + | |||
| + | ### エラーログにdatabase disk image is malformedと出た | ||
| + | |||
| + | コマンドラインでSQLiteに入り、以下を実行 | ||
| + | |||
| + | ``` | ||
| + | sqlite> pragma integrity_check; | ||
| + | Page 538 is never used | ||
| + | row 125 missing from index hoge; | ||
| + | ``` | ||
| + | |||
| + | `missing from index`に対してはreindexする | ||
| + | |||
| + | |||
| + | ``` | ||
| + | sqlite> reindex; | ||
| + | ``` | ||
| + | |||
| + | `page never used`に対してはvacuumする | ||
| + | |||
| + | ``` | ||
| + | sqlite> vacuum; | ||
| + | ``` | ||
| + | |||
| + | 再度integrity_checkしてokと出たら修復完了 | ||
| + | |||
| + | ``` | ||
| + | sqlite> pragma integrity_check; | ||
| + | ok | ||
| + | ``` | ||
| </ | </ | ||
sqlite.1648605823.txt.gz · 最終更新: by nullpon