SQLite Forum

Timeline
Login

5 events by user achamb

2021-10-26
23:12 Reply: cksumvfs producing invalid checksums artifact: 6a47db65a2 user: achamb

Thanks for confirming.

2021-08-11
11:53 Reply: cksumvfs producing invalid checksums artifact: ac2227c989 user: achamb

Anyone able to reproduce this?

2021-07-27
07:08 Edit: cksumvfs producing invalid checksums artifact: 85ace48fa5 user: achamb

I have been attempting to add page checksums to an sqlite3 database used by my backup software, but have found when using https://www.sqlite.org/cksumvfs.html I am unable to migrate an existing database without getting checksum failures.

Below is a git repository containing the database and a script to reproduce the issue:

https://github.com/andrewchambers/sqlitecksumvfsreport

A summary of the problem:

cp backup.sendlog backup.copy.sendlog

# Vacuum works fine initially, integrity checks pass.
./sqlite3-shell <<EOF
.open backup.copy.sendlog
vacuum;
vacuum;
pragma integrity_check;
EOF

# Enable cksumvfs following sqlite website.
# Second vacuum fails with failed checksum, even though first was ok.
./sqlite3-shell <<EOF
.load ./cksumvfs.so
.open backup.copy.sendlog
.filectrl reserve_bytes 8
vacuum;
vacuum;
EOF

produces the output:

+ cp backup.sendlog backup.copy.sendlog
+ ./sqlite3-shell
ok
+ ./sqlite3-shell
8
Error: near line 5: disk I/O error

Could anyone help me confirm if this is a bug, or if I am doing anything wrong?

Thanks for any help.

02:13 Reply: cksumvfs producing invalid checksums artifact: 008ba83328 user: achamb

As a follow up, I can seemingly work around the issue by doing:

./sqlite3-shell <<EOF
.load ./cksumvfs.so
.open backup.copy.sendlog
.filectrl reserve_bytes 8
vacuum;
pragma checksum_verification=OFF;
vacuum;
pragma checksum_verification=ON;
vacuum;
EOF

Though the fact we need to do this pragma dance still seems a bit strange to me.

01:33 Post: cksumvfs producing invalid checksums artifact: e168e116a3 user: achamb

I have been attempting to add page checksums to an sqlite3 database used by my backup software, but have found when using https://www.sqlite.org/cksumvfs.html I am unable to migrate an existing database without getting checksum failures.

Below is a git repository containing the database and a script to reproduce the issue:

https://github.com/andrewchambers/sqlitecksumvfsreport

A summary of the problem:

cp backup.sendlog backup.copy.sendlog

# Vacuum works fine initially, integrity checks pass.
./sqlite3-shell <<EOF
.open backup.copy.sendlog
vacuum;
vacuum;
pragma integrity_check;
EOF

# Enable cksumvfs following sqlite website.
# Second vacuum fails with failed checksum, even thought first was ok.
./sqlite3-shell <<EOF
.load ./cksumvfs.so
.open backup.copy.sendlog
.filectrl reserve_bytes 8
vacuum;
vacuum;
EOF

produces the output:

+ cp backup.sendlog backup.copy.sendlog
+ ./sqlite3-shell
ok
+ ./sqlite3-shell
8
Error: near line 5: disk I/O error

Could anyone help me confirm if this is a bug, or if I am doing anything wrong?

Thanks for any help.