1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

When locking a database file, check if any backup objects need to be restarted even if the page cache is empty. Ticket #3858. (CVS 6632)

FossilOrigin-Name: 90309008c35494c7a075fe76f7eb96b09a01d01b
This commit is contained in:
danielk1977
2009-05-13 07:52:06 +00:00
parent 8b4aff3919
commit e70f4f6482
5 changed files with 80 additions and 26 deletions

View File

@@ -18,7 +18,7 @@
** file simultaneously, or one process from reading the database while
** another is writing.
**
** @(#) $Id: pager.c,v 1.586 2009/05/06 18:57:10 shane Exp $
** @(#) $Id: pager.c,v 1.587 2009/05/13 07:52:06 danielk1977 Exp $
*/
#ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h"
@@ -3622,7 +3622,7 @@ static int pagerSharedLock(Pager *pPager){
);
}
if( sqlite3PcachePagecount(pPager->pPCache)>0 ){
if( pPager->pBackup || sqlite3PcachePagecount(pPager->pPCache)>0 ){
/* The shared-lock has just been acquired on the database file
** and there are already pages in the cache (from a previous
** read or write transaction). Check to see if the database