mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
Fix collection load failure on Android
Loading a larger collection with V16 enabled was failing in openCollection with error 6410, similar to https://github.com/simolus3/drift/issues/876
This commit is contained in:
parent
940f1dea06
commit
f15e294981
1 changed files with 3 additions and 0 deletions
|
@ -49,6 +49,9 @@ fn open_or_create_collection_db(path: &Path) -> Result<Connection> {
|
||||||
db.pragma_update(None, "cache_size", &(-40 * 1024))?;
|
db.pragma_update(None, "cache_size", &(-40 * 1024))?;
|
||||||
db.pragma_update(None, "legacy_file_format", &false)?;
|
db.pragma_update(None, "legacy_file_format", &false)?;
|
||||||
db.pragma_update(None, "journal_mode", &"wal")?;
|
db.pragma_update(None, "journal_mode", &"wal")?;
|
||||||
|
// Android has no /tmp folder, and fails in the default config.
|
||||||
|
#[cfg(target_os = "android")]
|
||||||
|
db.pragma_update(None, "temp_store", &"memory")?;
|
||||||
|
|
||||||
db.set_prepared_statement_cache_capacity(50);
|
db.set_prepared_statement_cache_capacity(50);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue