mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
A few more comment changes. No code alterations. (CVS 1689)
FossilOrigin-Name: b68b4a4262c2ab60f9a7cc0c206b9db207f86933
This commit is contained in:
14
src/pager.c
14
src/pager.c
@@ -18,7 +18,7 @@
|
||||
** file simultaneously, or one process from reading the database while
|
||||
** another is writing.
|
||||
**
|
||||
** @(#) $Id: pager.c,v 1.140 2004/06/25 07:21:28 danielk1977 Exp $
|
||||
** @(#) $Id: pager.c,v 1.141 2004/06/25 08:32:26 danielk1977 Exp $
|
||||
*/
|
||||
#include "os.h" /* Must be first to enable large file support */
|
||||
#include "sqliteInt.h"
|
||||
@@ -1952,7 +1952,17 @@ int sqlite3pager_get(Pager *pPager, Pgno pgno, void **ppPage){
|
||||
){
|
||||
int rc;
|
||||
|
||||
/* Get an EXCLUSIVE lock on the database file. */
|
||||
/* Get an EXCLUSIVE lock on the database file. At this point it is
|
||||
** important that a RESERVED lock is not obtained on the way to the
|
||||
** EXCLUSIVE lock. If it were, another process might open the
|
||||
** database file, detect the RESERVED lock, and conclude that the
|
||||
** database is safe to read while this process is still rolling it
|
||||
** back.
|
||||
**
|
||||
** Because the intermediate RESERVED lock is not requested, the
|
||||
** second process will get to this point in the code and fail to
|
||||
** obtain it's own EXCLUSIVE lock on the database file.
|
||||
*/
|
||||
rc = sqlite3OsLock(&pPager->fd, EXCLUSIVE_LOCK);
|
||||
if( rc!=SQLITE_OK ){
|
||||
sqlite3OsUnlock(&pPager->fd, NO_LOCK);
|
||||
|
Reference in New Issue
Block a user