SQLite Forum

Entries seen in WAL missing when reading DB

It appears that a page (page 293) is not being read by sqlite.

Entries from that page in the WAL file do **not** show up when reading the database (via query)

<h2>Example of Issue</h2>
The Wal header and frame which does not appear is shown below

<h4>WAL Header:</h4>

**Signature:** 931071618 <br/>
**Version:** 3007000 <br/>
**PageSize:** 4096 <br/>
**SequenceNumber:** 14 <br/>
**Salt1:** 3134934172 <br/>
**Salt2:** 3456589801 <br/>
**CheckSum1:** 2134105805 <br/>
**Checksum2:** 779796032 <br/>

Frames which are suspected to be missing
<h4>Frame Header:</h4>

**DBPageNumber:** 293 <br/>
**commitRecords:** 8232 <br/>
**Salt1:** 3134934172 <br/>
**Salt2:** 3456589801 <br/>
**Checksum1:** 3224136425 <br/>
**Checksum2:** 703062074 <br/>
<h4>Frame Data</h4>
2, '2021 Jul 13 04:45:35.879', None, 'local0', 'notice', 'xxxxx', 'yyyyy', '5198', 'random log 1' <br/>
2, '2021 Jul 13 04:45:36.780', None, 'local0', 'notice', 'xxxxx', 'yyyyyy', '6313', 'random log 2' <br/>

As can be seen, the salt 1 and salt 2 values match those of the wal header and so the above frame should still be valid.

There are multiple frames (24 copies) of page 293 which are similar to the above. However, there are frames with page number 293 which have an older salt 1 value (indicating that frame has been checkpointed):

**DBPageNumber:** 293<br/>
**commitRecords:** 0<br/>
**Salt1:** 3134934171<br/>
**Salt2:** 3988219145<br/>
**Checksum1:** 3140164133<br/>
**Checksum2:** 2899453040<br/>

The entries from this frame do not appear when reading the database. The entries are expected to be there due to timestamps showing up in the database read.

<h2>Other Info</h2>
An integrity check returned no errors on the database.

I logged out the page numbers from _sqlite3WalFindFrame()_ that sqlite was attempting to find in the wal file and none of them appear to be page 293. It seems sqlite does not even attempt to look for page 293 in the WAL file.

Any help/ideas would be appreciated.