mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Do not use the page containing locks for anything to avoid problems with
the manditory file locking on windows. (CVS 1595) FossilOrigin-Name: 5a814202777f381caf5337b37e11c9ab8b8f554a
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
** file simultaneously, or one process from reading the database while
|
||||
** another is writing.
|
||||
**
|
||||
** @(#) $Id: pager.c,v 1.126 2004/06/14 06:03:57 danielk1977 Exp $
|
||||
** @(#) $Id: pager.c,v 1.127 2004/06/15 01:40:29 drh Exp $
|
||||
*/
|
||||
#include "os.h" /* Must be first to enable large file support */
|
||||
#include "sqliteInt.h"
|
||||
@@ -1205,6 +1205,9 @@ int sqlite3pager_pagecount(Pager *pPager){
|
||||
return 0;
|
||||
}
|
||||
n /= SQLITE_PAGE_SIZE;
|
||||
if( !pPager->memDb && n==PENDING_BYTE/SQLITE_PAGE_SIZE ){
|
||||
n++;
|
||||
}
|
||||
if( pPager->state!=PAGER_UNLOCK ){
|
||||
pPager->dbSize = n;
|
||||
}
|
||||
@@ -2209,6 +2212,9 @@ int sqlite3pager_write(void *pData){
|
||||
*/
|
||||
if( pPager->dbSize<(int)pPg->pgno ){
|
||||
pPager->dbSize = pPg->pgno;
|
||||
if( !pPager->memDb && pPager->dbSize==PENDING_BYTE/pPager->pageSize ){
|
||||
pPager->dbSize++;
|
||||
}
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
Reference in New Issue
Block a user