Files
litestream/testdata/wal-downloader/ok/README
Ben Johnson 006e4b7155 Update index & offset encoding
Previously, the index & offsets were encoded as 8-character hex
strings, however, this limits the maximum value to a `uint32`. This
is normally not an issue, however, indices could go over the maximum
value of 4 billion over time and the offset could exceed this value
for an especially large WAL update. For safety, these encodings have
been updated to 16-character hex encodings.
2022-02-08 13:14:49 -07:00

41 lines
806 B
Plaintext

To reproduce this testdata, run sqlite3 and execute:
PRAGMA journal_mode = WAL;
CREATE TABLE t (x);
INSERT INTO t (x) VALUES (1);
INSERT INTO t (x) VALUES (2);
And copy & split the WAL into segments:
sl3 split -o generations/0000000000000000/wal/0000000000000000 db-wal
cp db-wal 0000000000000000.wal
Then execute:
PRAGMA wal_checkpoint(TRUNCATE);
INSERT INTO t (x) VALUES (3);
And split again:
sl3 split -o generations/0000000000000000/wal/0000000000000001 db-wal
cp db-wal 0000000000000001.wal
Then execute:
PRAGMA wal_checkpoint(TRUNCATE);
INSERT INTO t (x) VALUES (4);
INSERT INTO t (x) VALUES (5);
And split again:
sl3 split -o generations/0000000000000000/wal/0000000000000002 db-wal
cp db-wal 0000000000000002.wal
Finally, remove the original database files:
rm db*