(6410) SQLITE_IOERR_GETTEMPPATH thrown on first write on Android #177

Open
opened 2020-08-06 16:56:13 +00:00 by gburd · 0 comments
gburd commented 2020-08-06 16:56:13 +00:00 (Migrated from github.com)

For reference: The SQLITE_IOERR_GETTEMPPATH error code is an extended error code for SQLITE_IOERR indicating that the VFS is unable to determine a suitable directory in which to place temporary files.

This implies that SQLite being used is compiled with SQLITE_TEMP_STORE=1 build flag, and somehow in this particular environment it's failing to determine a suitable location on disk for temp files.

From Firefox's build config, on Android SQLite is forced to use memory for temp store: https://dxr.mozilla.org/mozilla-central/source/db/sqlite3/src/moz.build#90
"On Android there's no tmp partition, so always use a MEMORY temp store" - via SQLITE_TEMP_STORE=3 flag.

We can force temp files to be stored in memory via PRAGMA temp_store=2.

For reference: `The SQLITE_IOERR_GETTEMPPATH error code is an extended error code for SQLITE_IOERR indicating that the VFS is unable to determine a suitable directory in which to place temporary files.` This implies that SQLite being used is compiled with `SQLITE_TEMP_STORE=1` build flag, and somehow in this particular environment it's failing to determine a suitable location on disk for temp files. From Firefox's build config, on Android SQLite is forced to use memory for temp store: https://dxr.mozilla.org/mozilla-central/source/db/sqlite3/src/moz.build#90 "On Android there's no tmp partition, so always use a MEMORY temp store" - via SQLITE_TEMP_STORE=3 flag. We can force temp files to be stored in memory via `PRAGMA temp_store=2`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: greg/mentat#177
No description provided.