Skip to content

Commit 138de51

Browse files
authored
Tune auto db backup (and prevent crash) (#4293)
1 parent 0a60282 commit 138de51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main/SQLHelper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7776,7 +7776,7 @@ bool CSQLHelper::BackupDatabase(const std::string& OutputFile)
77767776
// Each iteration of this loop copies 5 database pages from database
77777777
// pDb to the backup database.
77787778
do {
7779-
rc = sqlite3_backup_step(pBackup, 5);
7779+
rc = sqlite3_backup_step(pBackup, 256);
77807780
//xProgress( sqlite3_backup_remaining(pBackup), sqlite3_backup_pagecount(pBackup) );
77817781
if( rc==SQLITE_OK || rc==SQLITE_BUSY || rc==SQLITE_LOCKED ){
77827782
sqlite3_sleep(250);

0 commit comments

Comments
 (0)