DoltLite accepts every PRAGMA that configures the pager, the journal, or the
on-disk layout, and then ignores it. The value never changes and no error is
raised. This follows SQLite's own convention — SQLite silently accepts unknown
pragmas and unsupported values rather than erroring — but it means a caller
cannot tell that the setting did nothing.
The dividing line is DoltLite's architecture: everything above btree.h is
upstream SQLite and works unchanged, so connection-level pragmas behave
normally. Everything below it is the prolly chunk store, which has no pages, no
freelist, no rollback journal and no -wal/-shm sidecars, so pragmas
describing those have nothing to configure.
Verified by setting each pragma on a brand-new database and reading it back,
against stock SQLite for comparison.
Silently accepted, no effect
| PRAGMA |
DoltLite always reports |
Stock |
journal_mode |
wal |
honours delete/memory/off/… |
auto_vacuum |
0 |
2 when set before creation |
secure_delete |
0 |
1 |
journal_size_limit |
-1 |
32768 |
mmap_size |
0 |
1048576 |
encoding |
UTF-8 |
UTF-16le (see #1838) |
writable_schema |
0 |
1 |
page_size is a special case: DoltLite accepts it and reports the new value,
so it looks honoured while meaning nothing — the store has no pages.
Readable, but synthetic
page_count (chunk count, not file pages), freelist_count (always 0),
schema_version (hash-derived, not a counter), data_version.
lock_status and stats exist only in SQLITE_TEST builds and report
chunk-store internals that have no page-level equivalent.
Explicitly rejected
wal_checkpoint(FULL|RESTART|TRUNCATE) is the one pragma that errors rather
than no-oping: "wal_checkpoint mode is not configurable on doltlite-format
databases; use the default (PASSIVE) form".
Supported, behaves as stock
locking_mode, cache_size, max_page_count, read_uncommitted,
synchronous, temp_store, foreign_keys, recursive_triggers,
legacy_alter_table, ignore_check_constraints, automatic_index,
query_only, defer_foreign_keys, cell_size_check,
reverse_unordered_selects, analysis_limit, threads, busy_timeout,
wal_autocheckpoint, application_id, user_version, fullfsync,
checkpoint_fullfsync, trusted_schema, integrity_check, quick_check,
and the schema-introspection pragmas (table_info, index_info, …).
Why this issue exists
These no-ops account for a large share of the inherited testfixture divergence
list, which currently attributes them one file at a time. Mentions of these
pragma names across known_testfixture_divergences.txt and
known_testfixture_crashes.txt: journal_mode 197, page_count 83, stats
48, auto_vacuum 47, page_size 34, lock_status 34, wal_checkpoint 28,
encoding 24, locking_mode 14, freelist_count 13, incremental_vacuum 10,
writable_schema 9, secure_delete 8, mmap_size 4.
This is the anchor those gates can cite instead of restating the reason per
suite.
Open question: should the no-ops be visible?
Two of the failure classes this causes are not cosmetic:
pager4 asserts that journal mode decides whether writing to a renamed
database is allowed (OFF/MEMORY succeed, DELETE/TRUNCATE/PERSIST
return SQLITE_READONLY). DoltLite has one behaviour for all of them, so at
least two of those assertions can never pass while journal_mode is a no-op.
Making journal_mode report memory — which is the closest match, since
DoltLite keeps its log inside the single file and creates no sidecar — would
let the OFF/MEMORY cases pass honestly.
- A caller that sets
secure_delete=1 or journal_size_limit for durability or
disk-usage reasons gets silence, not a diagnostic.
Worth deciding whether these should stay silent (SQLite-compatible), start
reporting the mode DoltLite actually implements, or warn.
DoltLite accepts every
PRAGMAthat configures the pager, the journal, or theon-disk layout, and then ignores it. The value never changes and no error is
raised. This follows SQLite's own convention — SQLite silently accepts unknown
pragmas and unsupported values rather than erroring — but it means a caller
cannot tell that the setting did nothing.
The dividing line is DoltLite's architecture: everything above
btree.hisupstream SQLite and works unchanged, so connection-level pragmas behave
normally. Everything below it is the prolly chunk store, which has no pages, no
freelist, no rollback journal and no
-wal/-shmsidecars, so pragmasdescribing those have nothing to configure.
Verified by setting each pragma on a brand-new database and reading it back,
against stock SQLite for comparison.
Silently accepted, no effect
journal_modewaldelete/memory/off/…auto_vacuum02when set before creationsecure_delete01journal_size_limit-132768mmap_size01048576encodingUTF-8UTF-16le(see #1838)writable_schema01page_sizeis a special case: DoltLite accepts it and reports the new value,so it looks honoured while meaning nothing — the store has no pages.
Readable, but synthetic
page_count(chunk count, not file pages),freelist_count(always 0),schema_version(hash-derived, not a counter),data_version.lock_statusandstatsexist only inSQLITE_TESTbuilds and reportchunk-store internals that have no page-level equivalent.
Explicitly rejected
wal_checkpoint(FULL|RESTART|TRUNCATE)is the one pragma that errors ratherthan no-oping: "wal_checkpoint mode is not configurable on doltlite-format
databases; use the default (PASSIVE) form".
Supported, behaves as stock
locking_mode,cache_size,max_page_count,read_uncommitted,synchronous,temp_store,foreign_keys,recursive_triggers,legacy_alter_table,ignore_check_constraints,automatic_index,query_only,defer_foreign_keys,cell_size_check,reverse_unordered_selects,analysis_limit,threads,busy_timeout,wal_autocheckpoint,application_id,user_version,fullfsync,checkpoint_fullfsync,trusted_schema,integrity_check,quick_check,and the schema-introspection pragmas (
table_info,index_info, …).Why this issue exists
These no-ops account for a large share of the inherited testfixture divergence
list, which currently attributes them one file at a time. Mentions of these
pragma names across
known_testfixture_divergences.txtandknown_testfixture_crashes.txt:journal_mode197,page_count83,stats48,
auto_vacuum47,page_size34,lock_status34,wal_checkpoint28,encoding24,locking_mode14,freelist_count13,incremental_vacuum10,writable_schema9,secure_delete8,mmap_size4.This is the anchor those gates can cite instead of restating the reason per
suite.
Open question: should the no-ops be visible?
Two of the failure classes this causes are not cosmetic:
pager4asserts that journal mode decides whether writing to a renameddatabase is allowed (
OFF/MEMORYsucceed,DELETE/TRUNCATE/PERSISTreturn
SQLITE_READONLY). DoltLite has one behaviour for all of them, so atleast two of those assertions can never pass while
journal_modeis a no-op.Making
journal_modereportmemory— which is the closest match, sinceDoltLite keeps its log inside the single file and creates no sidecar — would
let the
OFF/MEMORYcases pass honestly.secure_delete=1orjournal_size_limitfor durability ordisk-usage reasons gets silence, not a diagnostic.
Worth deciding whether these should stay silent (SQLite-compatible), start
reporting the mode DoltLite actually implements, or warn.