Lines Matching refs:pFile
14819 sqlite3_file *pFile, in sqlite3OsOpen() argument
14829 rc = pVfs->xOpen(pVfs, zPath, pFile, flags & 0x87f7f, pFlagsOut); in sqlite3OsOpen()
14830 assert( rc==SQLITE_OK || pFile->pMethods==0 ); in sqlite3OsOpen()
14903 sqlite3_file *pFile; in sqlite3OsOpenMalloc() local
14904 pFile = (sqlite3_file *)sqlite3MallocZero(pVfs->szOsFile); in sqlite3OsOpenMalloc()
14905 if( pFile ){ in sqlite3OsOpenMalloc()
14906 rc = sqlite3OsOpen(pVfs, zFile, pFile, flags, pOutFlags); in sqlite3OsOpenMalloc()
14908 sqlite3_free(pFile); in sqlite3OsOpenMalloc()
14910 *ppFile = pFile; in sqlite3OsOpenMalloc()
14915 SQLITE_PRIVATE int sqlite3OsCloseFree(sqlite3_file *pFile){ in sqlite3OsCloseFree() argument
14917 assert( pFile ); in sqlite3OsCloseFree()
14918 rc = sqlite3OsClose(pFile); in sqlite3OsCloseFree()
14919 sqlite3_free(pFile); in sqlite3OsCloseFree()
22978 os2File *pFile = (os2File*)id;
22981 OSTRACE(( "CLOSE %d (%s)\n", pFile->h, pFile->zFullPathCp ));
22983 rc = DosClose( pFile->h );
22985 if( pFile->flags & SQLITE_OPEN_DELETEONCLOSE )
22986 DosForceDelete( (PSZ)pFile->zFullPathCp );
22988 free( pFile->zFullPathCp );
22989 pFile->zFullPathCp = NULL;
22990 pFile->locktype = NO_LOCK;
22991 pFile->h = (HFILE)-1;
22992 pFile->flags = 0;
23011 os2File *pFile = (os2File*)id;
23014 OSTRACE(( "READ %d lock=%d\n", pFile->h, pFile->locktype ));
23015 if( DosSetFilePtr(pFile->h, offset, FILE_BEGIN, &fileLocation) != NO_ERROR ){
23018 if( DosRead( pFile->h, pBuf, amt, &got ) != NO_ERROR ){
23043 os2File *pFile = (os2File*)id;
23047 OSTRACE(( "WRITE %d lock=%d\n", pFile->h, pFile->locktype ));
23048 if( DosSetFilePtr(pFile->h, offset, FILE_BEGIN, &fileLocation) != NO_ERROR ){
23053 ( rc = DosWrite( pFile->h, (PVOID)pBuf, amt, &wrote ) ) == NO_ERROR &&
23068 os2File *pFile = (os2File*)id;
23070 OSTRACE(( "TRUNCATE %d %lld\n", pFile->h, nByte ));
23078 if( pFile->szChunk ){
23079 nByte = ((nByte + pFile->szChunk - 1)/pFile->szChunk) * pFile->szChunk;
23082 rc = DosSetFileSize( pFile->h, nByte );
23099 os2File *pFile = (os2File*)id;
23100 OSTRACE(( "SYNC %d lock=%d\n", pFile->h, pFile->locktype ));
23111 UNUSED_PARAMETER(pFile);
23114 return DosResetBuffer( pFile->h ) == NO_ERROR ? SQLITE_OK : SQLITE_IOERR;
23139 static int getReadLock( os2File *pFile ){
23149 res = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 1L );
23150 OSTRACE(( "GETREADLOCK %d res=%d\n", pFile->h, res ));
23205 os2File *pFile = (os2File*)id;
23208 assert( pFile!=0 );
23209 OSTRACE(( "LOCK %d %d was %d\n", pFile->h, locktype, pFile->locktype ));
23215 if( pFile->locktype>=locktype ){
23216 OSTRACE(( "LOCK %d %d ok (already held)\n", pFile->h, locktype ));
23222 assert( pFile->locktype!=NO_LOCK || locktype==SHARED_LOCK );
23224 assert( locktype!=RESERVED_LOCK || pFile->locktype==SHARED_LOCK );
23230 newLocktype = pFile->locktype;
23231 if( pFile->locktype==NO_LOCK
23232 || (locktype==EXCLUSIVE_LOCK && pFile->locktype==RESERVED_LOCK)
23240 res = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, 100L, 0L );
23243 OSTRACE(( "LOCK %d pending lock boolean set. res=%d\n", pFile->h, res ));
23250 assert( pFile->locktype==NO_LOCK );
23251 res = getReadLock(pFile);
23255 OSTRACE(( "LOCK %d acquire shared lock. res=%d\n", pFile->h, res ));
23261 assert( pFile->locktype==SHARED_LOCK );
23266 res = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 0L );
23270 OSTRACE(( "LOCK %d acquire reserved lock. res=%d\n", pFile->h, res ));
23279 pFile->h ));
23285 assert( pFile->locktype>=SHARED_LOCK );
23286 res = unlockReadLock(pFile);
23292 res = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 0L );
23297 getReadLock(pFile);
23299 OSTRACE(( "LOCK %d acquire exclusive lock. res=%d\n", pFile->h, res ));
23311 r = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 0L );
23312 OSTRACE(( "LOCK %d unlocking pending/is shared. r=%d\n", pFile->h, r ));
23321 OSTRACE(( "LOCK FAILED %d trying for %d but got %d\n", pFile->h,
23325 pFile->locktype = newLocktype;
23326 OSTRACE(( "LOCK %d now %d\n", pFile->h, pFile->locktype ));
23337 os2File *pFile = (os2File*)id;
23338 assert( pFile!=0 );
23339 if( pFile->locktype>=RESERVED_LOCK ){
23341 OSTRACE(( "TEST WR-LOCK %d %d (local)\n", pFile->h, r ));
23352 rc = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 0L );
23353 OSTRACE(( "TEST WR-LOCK %d lock reserved byte rc=%d\n", pFile->h, rc ));
23360 rcu = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 0L );
23361 OSTRACE(( "TEST WR-LOCK %d unlock reserved byte r=%d\n", pFile->h, rcu ));
23364 OSTRACE(( "TEST WR-LOCK %d %d (remote)\n", pFile->h, r ));
23383 os2File *pFile = (os2File*)id;
23390 assert( pFile!=0 );
23392 OSTRACE(( "UNLOCK %d to %d was %d\n", pFile->h, locktype, pFile->locktype ));
23393 type = pFile->locktype;
23399 res = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 0L );
23400 OSTRACE(( "UNLOCK %d exclusive lock res=%d\n", pFile->h, res ));
23401 if( locktype==SHARED_LOCK && getReadLock(pFile) != NO_ERROR ){
23404 OSTRACE(( "UNLOCK %d to %d getReadLock() failed\n", pFile->h, locktype ));
23413 res = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 0L );
23414 OSTRACE(( "UNLOCK %d reserved res=%d\n", pFile->h, res ));
23417 res = unlockReadLock(pFile);
23419 pFile->h, type, locktype, res ));
23426 res = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 0L );
23427 OSTRACE(( "UNLOCK %d pending res=%d\n", pFile->h, res ));
23429 pFile->locktype = locktype;
23430 OSTRACE(( "UNLOCK %d now %d\n", pFile->h, pFile->locktype ));
23959 os2File *pFile = (os2File*)id;
23963 if( !pFile->pShmLink )
23964 rc = os2OpenSharedMemory( pFile, szRegion );
23967 pNode = pFile->pShmLink->pShmNode ;
24027 pFile->zFullPathCp, iRegion, szRegion, bExtend, rc))
24043 os2File *pFile = (os2File*)id;
24044 os2ShmLink *pLink = pFile->pShmLink;
24067 pFile->pShmLink = NULL;
24095 os2File *pFile = (os2File*)id;
24096 os2ShmLink *p = pFile->pShmLink; /* The shared memory being locked */
24352 os2File *pFile = (os2File*)id;
24400 memset( pFile, 0, sizeof(*pFile) );
24401 pFile->h = (HFILE)-1;
24474 pFile->zFullPathCp = convertUtf8PathToCp( zTmpname );
24475 pFile->pMethod = &os2IoMethod;
24476 pFile->flags = flags;
24477 pFile->h = h;
24480 OSTRACE(( "OPEN %d pOutFlags=%d\n", pFile->h, pOutFlags ));
26123 static void robust_close(unixFile *pFile, int h, int lineno){
26126 pFile ? pFile->zPath : 0, lineno);
26133 static void closePendingFds(unixFile *pFile){
26134 unixInodeInfo *pInode = pFile->pInode;
26139 robust_close(pFile, p->fd, __LINE__);
26151 static void releaseInodeInfo(unixFile *pFile){
26152 unixInodeInfo *pInode = pFile->pInode;
26158 closePendingFds(pFile);
26186 unixFile *pFile, /* Unix file with file desc used in the key */
26200 fd = pFile->h;
26203 pFile->lastErrno = errno;
26205 if( pFile->lastErrno==EOVERFLOW ) return SQLITE_NOLFS;
26221 if( statbuf.st_size==0 && (pFile->fsFlags & SQLITE_FSFLAGS_IS_MSDOS)!=0 ){
26224 pFile->lastErrno = errno;
26229 pFile->lastErrno = errno;
26238 fileId.pId = pFile->pId;
26275 unixFile *pFile = (unixFile*)id;
26279 assert( pFile );
26283 if( pFile->pInode->eFileLock>SHARED_LOCK ){
26290 if( !reserved && !pFile->pInode->bProcessLock ){
26296 if( osFcntl(pFile->h, F_GETLK, &lock) ){
26298 pFile->lastErrno = errno;
26306 OSTRACE(("TEST WR-LOCK %d %d %d (unix)\n", pFile->h, rc, reserved));
26331 static int unixFileLock(unixFile *pFile, struct flock *pLock){
26333 unixInodeInfo *pInode = pFile->pInode;
26336 if( ((pFile->ctrlFlags & UNIXFILE_EXCL)!=0 || pInode->bProcessLock)
26337 && ((pFile->ctrlFlags & UNIXFILE_RDONLY)==0)
26346 rc = osFcntl(pFile->h, F_SETLK, &lock);
26354 rc = osFcntl(pFile->h, F_SETLK, pLock);
26423 unixFile *pFile = (unixFile*)id;
26428 assert( pFile );
26429 OSTRACE(("LOCK %d %s was %s(%s,%d) pid=%d (unix)\n", pFile->h,
26430 azFileLock(eFileLock), azFileLock(pFile->eFileLock),
26431 azFileLock(pFile->pInode->eFileLock), pFile->pInode->nShared , getpid()));
26437 if( pFile->eFileLock>=eFileLock ){
26438 OSTRACE(("LOCK %d %s ok (already held) (unix)\n", pFile->h,
26448 assert( pFile->eFileLock!=NO_LOCK || eFileLock==SHARED_LOCK );
26450 assert( eFileLock!=RESERVED_LOCK || pFile->eFileLock==SHARED_LOCK );
26455 pInode = pFile->pInode;
26460 if( (pFile->eFileLock!=pInode->eFileLock &&
26474 assert( pFile->eFileLock==0 );
26476 pFile->eFileLock = SHARED_LOCK;
26490 || (eFileLock==EXCLUSIVE_LOCK && pFile->eFileLock<PENDING_LOCK)
26494 if( unixFileLock(pFile, &lock) ){
26498 pFile->lastErrno = tErrno;
26516 if( unixFileLock(pFile, &lock) ){
26525 if( unixFileLock(pFile, &lock) && rc==SQLITE_OK ){
26533 pFile->lastErrno = tErrno;
26537 pFile->eFileLock = SHARED_LOCK;
26550 assert( 0!=pFile->eFileLock );
26562 if( unixFileLock(pFile, &lock) ){
26566 pFile->lastErrno = tErrno;
26579 && pFile->eFileLock<=SHARED_LOCK
26582 pFile->transCntrChng = 0;
26583 pFile->dbUpdate = 0;
26584 pFile->inNormalWrite = 1;
26590 pFile->eFileLock = eFileLock;
26593 pFile->eFileLock = PENDING_LOCK;
26599 OSTRACE(("LOCK %d %s %s (unix)\n", pFile->h, azFileLock(eFileLock),
26608 static void setPendingFd(unixFile *pFile){
26609 unixInodeInfo *pInode = pFile->pInode;
26610 UnixUnusedFd *p = pFile->pUnused;
26613 pFile->h = -1;
26614 pFile->pUnused = 0;
26631 unixFile *pFile = (unixFile*)id;
26636 assert( pFile );
26637 OSTRACE(("UNLOCK %d %d was %d(%d,%d) pid=%d (unix)\n", pFile->h, eFileLock,
26638 pFile->eFileLock, pFile->pInode->eFileLock, pFile->pInode->nShared,
26642 if( pFile->eFileLock<=eFileLock ){
26646 pInode = pFile->pInode;
26648 if( pFile->eFileLock>SHARED_LOCK ){
26649 assert( pInode->eFileLock==pFile->eFileLock );
26660 pFile->inNormalWrite = 0;
26687 if( unixFileLock(pFile, &lock)==(-1) ){
26691 pFile->lastErrno = tErrno;
26699 if( unixFileLock(pFile, &lock)==(-1) ){
26703 pFile->lastErrno = tErrno;
26711 if( unixFileLock(pFile, &lock)==(-1) ){
26715 pFile->lastErrno = tErrno;
26726 if( unixFileLock(pFile, &lock) ){
26734 pFile->lastErrno = errno;
26743 if( unixFileLock(pFile, &lock)==0 ){
26747 pFile->lastErrno = errno;
26761 if( unixFileLock(pFile, &lock)==0 ){
26765 pFile->lastErrno = errno;
26767 pFile->eFileLock = NO_LOCK;
26778 closePendingFds(pFile);
26784 if( rc==SQLITE_OK ) pFile->eFileLock = eFileLock;
26810 unixFile *pFile = (unixFile*)id;
26811 if( pFile->h>=0 ){
26812 robust_close(pFile, pFile->h, __LINE__);
26813 pFile->h = -1;
26816 if( pFile->pId ){
26817 if( pFile->ctrlFlags & UNIXFILE_DELETE ){
26818 osUnlink(pFile->pId->zCanonicalName);
26820 vxworksReleaseFileId(pFile->pId);
26821 pFile->pId = 0;
26824 OSTRACE(("CLOSE %-3d\n", pFile->h));
26826 sqlite3_free(pFile->pUnused);
26827 memset(pFile, 0, sizeof(unixFile));
26836 unixFile *pFile = (unixFile *)id;
26843 assert( pFile->pInode->nLock>0 || pFile->pInode->bProcessLock==0 );
26844 if( ALWAYS(pFile->pInode) && pFile->pInode->nLock ){
26850 setPendingFd(pFile);
26852 releaseInodeInfo(pFile);
26943 unixFile *pFile = (unixFile*)id;
26947 assert( pFile );
26950 if( pFile->eFileLock>SHARED_LOCK ){
26956 const char *zLockFile = (const char*)pFile->lockingContext;
26959 OSTRACE(("TEST WR-LOCK %d %d %d (dotlock)\n", pFile->h, rc, reserved));
26992 unixFile *pFile = (unixFile*)id;
26993 char *zLockFile = (char *)pFile->lockingContext;
27000 if( pFile->eFileLock > NO_LOCK ){
27001 pFile->eFileLock = eFileLock;
27021 pFile->lastErrno = tErrno;
27028 pFile->eFileLock = eFileLock;
27042 unixFile *pFile = (unixFile*)id;
27043 char *zLockFile = (char *)pFile->lockingContext;
27046 assert( pFile );
27047 OSTRACE(("UNLOCK %d %d was %d pid=%d (dotlock)\n", pFile->h, eFileLock,
27048 pFile->eFileLock, getpid()));
27052 if( pFile->eFileLock==eFileLock ){
27060 pFile->eFileLock = SHARED_LOCK;
27075 pFile->lastErrno = tErrno;
27079 pFile->eFileLock = NO_LOCK;
27089 unixFile *pFile = (unixFile*)id;
27091 sqlite3_free(pFile->lockingContext);
27139 unixFile *pFile = (unixFile*)id;
27143 assert( pFile );
27146 if( pFile->eFileLock>SHARED_LOCK ){
27153 int lrc = robust_flock(pFile->h, LOCK_EX | LOCK_NB);
27156 lrc = robust_flock(pFile->h, LOCK_UN);
27162 pFile->lastErrno = tErrno;
27172 pFile->lastErrno = tErrno;
27177 OSTRACE(("TEST WR-LOCK %d %d %d (flock)\n", pFile->h, rc, reserved));
27220 unixFile *pFile = (unixFile*)id;
27222 assert( pFile );
27226 if (pFile->eFileLock > NO_LOCK) {
27227 pFile->eFileLock = eFileLock;
27233 if (robust_flock(pFile->h, LOCK_EX | LOCK_NB)) {
27238 pFile->lastErrno = tErrno;
27242 pFile->eFileLock = eFileLock;
27244 OSTRACE(("LOCK %d %s %s (flock)\n", pFile->h, azFileLock(eFileLock),
27263 unixFile *pFile = (unixFile*)id;
27265 assert( pFile );
27266 OSTRACE(("UNLOCK %d %d was %d pid=%d (flock)\n", pFile->h, eFileLock,
27267 pFile->eFileLock, getpid()));
27271 if( pFile->eFileLock==eFileLock ){
27277 pFile->eFileLock = eFileLock;
27282 if( robust_flock(pFile->h, LOCK_UN) ){
27288 pFile->eFileLock = NO_LOCK;
27329 unixFile *pFile = (unixFile*)id;
27333 assert( pFile );
27336 if( pFile->eFileLock>SHARED_LOCK ){
27342 sem_t *pSem = pFile->pInode->pSem;
27349 pFile->lastErrno = tErrno;
27352 reserved = (pFile->eFileLock < SHARED_LOCK);
27359 OSTRACE(("TEST WR-LOCK %d %d %d (sem)\n", pFile->h, rc, reserved));
27395 unixFile *pFile = (unixFile*)id;
27397 sem_t *pSem = pFile->pInode->pSem;
27402 if (pFile->eFileLock > NO_LOCK) {
27403 pFile->eFileLock = eFileLock;
27415 pFile->eFileLock = eFileLock;
27429 unixFile *pFile = (unixFile*)id;
27430 sem_t *pSem = pFile->pInode->pSem;
27432 assert( pFile );
27434 OSTRACE(("UNLOCK %d %d was %d pid=%d (sem)\n", pFile->h, eFileLock,
27435 pFile->eFileLock, getpid()));
27439 if( pFile->eFileLock==eFileLock ){
27445 pFile->eFileLock = eFileLock;
27454 pFile->lastErrno = tErrno;
27458 pFile->eFileLock = NO_LOCK;
27467 unixFile *pFile = (unixFile*)id;
27469 assert( pFile );
27471 releaseInodeInfo(pFile);
27526 unixFile *pFile, /* Open file descriptor on path */
27538 pb.fd = pFile->h;
27541 (setLockFlag?"ON":"OFF"), pFile->h, (pb.fd==-1?"[testval-1]":""),
27556 pFile->lastErrno = tErrno;
27573 unixFile *pFile = (unixFile*)id;
27578 assert( pFile );
27579 context = (afpLockingContext *) pFile->lockingContext;
27587 if( pFile->pInode->eFileLock>SHARED_LOCK ){
27595 int lrc = afpSetLock(context->dbPath, pFile, RESERVED_BYTE, 1,1);
27599 lrc = afpSetLock(context->dbPath, pFile, RESERVED_BYTE, 1, 0);
27610 OSTRACE(("TEST WR-LOCK %d %d %d (afp)\n", pFile->h, rc, reserved));
27642 unixFile *pFile = (unixFile*)id;
27643 unixInodeInfo *pInode = pFile->pInode;
27644 afpLockingContext *context = (afpLockingContext *) pFile->lockingContext;
27646 assert( pFile );
27647 OSTRACE(("LOCK %d %s was %s(%s,%d) pid=%d (afp)\n", pFile->h,
27648 azFileLock(eFileLock), azFileLock(pFile->eFileLock),
27655 if( pFile->eFileLock>=eFileLock ){
27656 OSTRACE(("LOCK %d %s ok (already held) (afp)\n", pFile->h,
27666 assert( pFile->eFileLock!=NO_LOCK || eFileLock==SHARED_LOCK );
27668 assert( eFileLock!=RESERVED_LOCK || pFile->eFileLock==SHARED_LOCK );
27673 pInode = pFile->pInode;
27678 if( (pFile->eFileLock!=pInode->eFileLock &&
27692 assert( pFile->eFileLock==0 );
27694 pFile->eFileLock = SHARED_LOCK;
27705 || (eFileLock==EXCLUSIVE_LOCK && pFile->eFileLock<PENDING_LOCK)
27708 failed = afpSetLock(context->dbPath, pFile, PENDING_BYTE, 1, 1);
27730 lrc1 = afpSetLock(context->dbPath, pFile,
27733 lrc1Errno = pFile->lastErrno;
27736 lrc2 = afpSetLock(context->dbPath, pFile, PENDING_BYTE, 1, 0);
27739 pFile->lastErrno = lrc1Errno;
27748 pFile->eFileLock = SHARED_LOCK;
27762 assert( 0!=pFile->eFileLock );
27763 if (eFileLock >= RESERVED_LOCK && pFile->eFileLock < RESERVED_LOCK) {
27765 failed = afpSetLock(context->dbPath, pFile, RESERVED_BYTE, 1,1);
27776 if( !(failed = afpSetLock(context->dbPath, pFile, SHARED_FIRST +
27780 failed = afpSetLock(context->dbPath, pFile, SHARED_FIRST,
27782 if( failed && (failed2 = afpSetLock(context->dbPath, pFile,
27801 pFile->eFileLock = eFileLock;
27804 pFile->eFileLock = PENDING_LOCK;
27810 OSTRACE(("LOCK %d %s %s (afp)\n", pFile->h, azFileLock(eFileLock),
27824 unixFile *pFile = (unixFile*)id;
27826 afpLockingContext *context = (afpLockingContext *) pFile->lockingContext;
27829 int h = pFile->h;
27832 assert( pFile );
27833 OSTRACE(("UNLOCK %d %d was %d(%d,%d) pid=%d (afp)\n", pFile->h, eFileLock,
27834 pFile->eFileLock, pFile->pInode->eFileLock, pFile->pInode->nShared,
27838 if( pFile->eFileLock<=eFileLock ){
27842 pInode = pFile->pInode;
27844 if( pFile->eFileLock>SHARED_LOCK ){
27845 assert( pInode->eFileLock==pFile->eFileLock );
27859 assert( pFile->inNormalWrite==0
27860 || pFile->dbUpdate==0
27861 || pFile->transCntrChng==1 );
27862 pFile->inNormalWrite = 0;
27865 if( pFile->eFileLock==EXCLUSIVE_LOCK ){
27866 rc = afpSetLock(context->dbPath, pFile, SHARED_FIRST, SHARED_SIZE, 0);
27870 rc = afpSetLock(context->dbPath, pFile, sharedLockByte, 1, 1);
27875 if( rc==SQLITE_OK && pFile->eFileLock>=PENDING_LOCK ){
27876 rc = afpSetLock(context->dbPath, pFile, PENDING_BYTE, 1, 0);
27878 if( rc==SQLITE_OK && pFile->eFileLock>=RESERVED_LOCK && context->reserved ){
27879 rc = afpSetLock(context->dbPath, pFile, RESERVED_BYTE, 1, 0);
27901 rc = afpSetLock(context->dbPath, pFile, sharedLockByte, 1, 0);
27905 pFile->eFileLock = NO_LOCK;
27912 closePendingFds(pFile);
27918 if( rc==SQLITE_OK ) pFile->eFileLock = eFileLock;
27928 unixFile *pFile = (unixFile*)id;
27931 if( pFile->pInode && pFile->pInode->nLock ){
27937 setPendingFd(pFile);
27939 releaseInodeInfo(pFile);
27940 sqlite3_free(pFile->lockingContext);
28061 unixFile *pFile = (unixFile *)id;
28068 assert( pFile->pUnused==0
28074 got = seekAndRead(pFile, offset, pBuf, amt);
28081 pFile->lastErrno = 0; /* not a system error */
28140 unixFile *pFile = (unixFile*)id;
28148 assert( pFile->pUnused==0
28161 if( pFile->inNormalWrite ){
28162 pFile->dbUpdate = 1; /* The database has been modified */
28167 rc = seekAndRead(pFile, 24, oldCntr, 4);
28170 pFile->transCntrChng = 1; /* The transaction counter has changed */
28176 while( amt>0 && (wrote = seekAndWrite(pFile, offset, pBuf, amt))>0 ){
28185 if( wrote<0 && pFile->lastErrno!=ENOSPC ){
28189 pFile->lastErrno = 0; /* not a system error */
28381 unixFile *pFile = (unixFile*)id;
28396 assert( pFile );
28397 OSTRACE(("SYNC %-3d\n", pFile->h));
28398 rc = full_fsync(pFile->h, isFullsync, isDataOnly);
28401 pFile->lastErrno = errno;
28402 return unixLogError(SQLITE_IOERR_FSYNC, "full_fsync", pFile->zPath);
28409 if( pFile->ctrlFlags & UNIXFILE_DIRSYNC ){
28411 OSTRACE(("DIRSYNC %s (have_fullfsync=%d fullsync=%d)\n", pFile->zPath,
28413 rc = osOpenDirectory(pFile->zPath, &dirfd);
28416 robust_close(pFile, dirfd, __LINE__);
28420 pFile->ctrlFlags &= ~UNIXFILE_DIRSYNC;
28429 unixFile *pFile = (unixFile *)id;
28431 assert( pFile );
28439 if( pFile->szChunk ){
28440 nByte = ((nByte + pFile->szChunk - 1)/pFile->szChunk) * pFile->szChunk;
28443 rc = robust_ftruncate(pFile->h, (off_t)nByte);
28445 pFile->lastErrno = errno;
28446 return unixLogError(SQLITE_IOERR_TRUNCATE, "ftruncate", pFile->zPath);
28456 if( pFile->inNormalWrite && nByte==0 ){
28457 pFile->transCntrChng = 1;
28506 static int fcntlSizeHint(unixFile *pFile, i64 nByte){
28507 if( pFile->szChunk>0 ){
28511 if( osFstat(pFile->h, &buf) ) return SQLITE_IOERR_FSTAT;
28513 nSize = ((nByte+pFile->szChunk-1) / pFile->szChunk) * pFile->szChunk;
28522 err = osFallocate(pFile->h, buf.st_size, nSize-buf.st_size);
28535 if( robust_ftruncate(pFile->h, nSize) ){
28536 pFile->lastErrno = errno;
28537 return unixLogError(SQLITE_IOERR_TRUNCATE, "ftruncate", pFile->zPath);
28541 int nWrite = seekAndWrite(pFile, iWrite, "", 1);
28558 static void unixModeBit(unixFile *pFile, unsigned char mask, int *pArg){
28560 *pArg = (pFile->ctrlFlags & mask)!=0;
28562 pFile->ctrlFlags &= ~mask;
28564 pFile->ctrlFlags |= mask;
28572 unixFile *pFile = (unixFile*)id;
28575 *(int*)pArg = pFile->eFileLock;
28579 *(int*)pArg = pFile->lastErrno;
28583 pFile->szChunk = *(int *)pArg;
28589 rc = fcntlSizeHint(pFile, *(i64 *)pArg);
28594 unixModeBit(pFile, UNIXFILE_PERSIST_WAL, (int*)pArg);
28598 unixModeBit(pFile, UNIXFILE_PSOW, (int*)pArg);
28602 *(char**)pArg = sqlite3_mprintf("%s", pFile->pVfs->zName);
28636 static int unixSectorSize(sqlite3_file *pFile){
28637 (void)pFile;
30031 sqlite3_file *pFile, /* The file descriptor to be filled in */
30035 unixFile *p = (unixFile *)pFile;
30210 ((unixFile*)pFile)->lastErrno = errno;
30215 ((unixFile*)pFile)->fsFlags |= SQLITE_FSFLAGS_IS_MSDOS;
30255 rc = fillInUnixFile(pVfs, fd, pFile, zPath, ctrlFlags);
30257 rc = proxyTransformUnixFile((unixFile*)pFile, ":auto:");
30263 unixClose(pFile);
30272 rc = fillInUnixFile(pVfs, fd, pFile, zPath, ctrlFlags);
31010 static int proxyBreakConchLock(unixFile *pFile, uuid_t myHostID){
31011 proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext;
31052 robust_close(pFile, conchFile->h, __LINE__);
31060 robust_close(pFile, fd, __LINE__);
31070 static int proxyConchLock(unixFile *pFile, uuid_t myHostID, int lockType){
31071 proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext;
31090 pFile->lastErrno = errno;
31110 pFile->lastErrno = errno;
31127 if( 0==proxyBreakConchLock(pFile, myHostID) ){
31148 static int proxyTakeConch(unixFile *pFile){
31149 proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext;
31172 pFile->lastErrno = pError;
31175 rc = proxyConchLock(pFile, myHostID, SHARED_LOCK);
31183 pFile->lastErrno = conchFile->lastErrno;
31253 rc = proxyConchLock(pFile, myHostID, EXCLUSIVE_LOCK);
31278 int err = osFstat(pFile->h, &buf);
31307 OSTRACE(("TRANSPROXY: CLOSE %d\n", pFile->h));
31308 if( rc==SQLITE_OK && pFile->openFlags ){
31310 if( pFile->h>=0 ){
31311 robust_close(pFile, pFile->h, __LINE__);
31313 pFile->h = -1;
31314 fd = robust_open(pCtx->dbPath, pFile->openFlags, 0);
31317 pFile->h = fd;
31368 static int proxyReleaseConch(unixFile *pFile){
31373 pCtx = (proxyLockingContext *)pFile->lockingContext;
31435 static int switchLockProxyPath(unixFile *pFile, const char *path) {
31436 proxyLockingContext *pCtx = (proxyLockingContext*)pFile->lockingContext;
31440 if( pFile->eFileLock!=NO_LOCK ){
31471 static int proxyGetDbPathForUnixFile(unixFile *pFile, char *dbPath){
31473 if( pFile->pMethod == &afpIoMethods ){
31476 assert( (int)strlen((char*)pFile->lockingContext)<=MAXPATHLEN );
31477 strlcpy(dbPath, ((afpLockingContext *)pFile->lockingContext)->dbPath, MAXPATHLEN);
31480 if( pFile->pMethod == &dotlockIoMethods ){
31483 int len = strlen((char *)pFile->lockingContext) - strlen(DOTLOCK_SUFFIX);
31484 memcpy(dbPath, (char *)pFile->lockingContext, len + 1);
31487 assert( strlen((char*)pFile->lockingContext)<=MAXPATHLEN );
31488 strlcpy(dbPath, (char *)pFile->lockingContext, MAXPATHLEN);
31501 static int proxyTransformUnixFile(unixFile *pFile, const char *path) {
31507 if( pFile->eFileLock!=NO_LOCK ){
31510 proxyGetDbPathForUnixFile(pFile, dbPath);
31517 OSTRACE(("TRANSPROXY %d for %s pid=%d\n", pFile->h,
31529 if( rc==SQLITE_CANTOPEN && ((pFile->openFlags&O_RDWR) == 0) ){
31565 pCtx->oldLockingContext = pFile->lockingContext;
31566 pFile->lockingContext = pCtx;
31567 pCtx->pOldMethod = pFile->pMethod;
31568 pFile->pMethod = &proxyIoMethods;
31578 OSTRACE(("TRANSPROXY %d %s\n", pFile->h,
31591 unixFile *pFile = (unixFile*)id;
31592 if( pFile->pMethod == &proxyIoMethods ){
31593 proxyLockingContext *pCtx = (proxyLockingContext*)pFile->lockingContext;
31594 proxyTakeConch(pFile);
31606 unixFile *pFile = (unixFile*)id;
31608 int isProxyStyle = (pFile->pMethod == &proxyIoMethods);
31621 (proxyLockingContext*)pFile->lockingContext;
31628 rc = switchLockProxyPath(pFile, proxyPath);
31632 rc = proxyTransformUnixFile(pFile, proxyPath);
31659 unixFile *pFile = (unixFile*)id;
31660 int rc = proxyTakeConch(pFile);
31662 proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext;
31698 unixFile *pFile = (unixFile*)id;
31699 int rc = proxyTakeConch(pFile);
31701 proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext;
31705 pFile->eFileLock = proxy->eFileLock;
31722 unixFile *pFile = (unixFile*)id;
31723 int rc = proxyTakeConch(pFile);
31725 proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext;
31729 pFile->eFileLock = proxy->eFileLock;
31742 unixFile *pFile = (unixFile*)id;
31743 proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext;
31758 rc = proxyReleaseConch(pFile);
31769 pFile->lockingContext = pCtx->oldLockingContext;
31770 pFile->pMethod = pCtx->pOldMethod;
31772 return pFile->pMethod->xClose(id);
33379 static BOOL winceCreateLock(const char *zFilename, winFile *pFile){
33391 memset(&pFile->local, 0, sizeof(pFile->local));
33401 pFile->hMutex = osCreateMutexW(NULL, FALSE, zName);
33402 if (!pFile->hMutex){
33403 pFile->lastErrno = osGetLastError();
33404 winLogError(SQLITE_ERROR, pFile->lastErrno, "winceCreateLock1", zFilename);
33410 winceMutexAcquire(pFile->hMutex);
33417 pFile->hShared = osCreateFileMappingW(INVALID_HANDLE_VALUE, NULL,
33430 if (pFile->hShared){
33431 pFile->shared = (winceLock*)osMapViewOfFile(pFile->hShared,
33434 if (!pFile->shared){
33435 pFile->lastErrno = osGetLastError();
33436 winLogError(SQLITE_ERROR, pFile->lastErrno,
33438 osCloseHandle(pFile->hShared);
33439 pFile->hShared = NULL;
33444 if (pFile->hShared == NULL){
33445 winceMutexRelease(pFile->hMutex);
33446 osCloseHandle(pFile->hMutex);
33447 pFile->hMutex = NULL;
33453 memset(pFile->shared, 0, sizeof(winceLock));
33456 winceMutexRelease(pFile->hMutex);
33463 static void winceDestroyLock(winFile *pFile){
33464 if (pFile->hMutex){
33466 winceMutexAcquire(pFile->hMutex);
33470 if (pFile->local.nReaders){
33471 pFile->shared->nReaders --;
33473 if (pFile->local.bReserved){
33474 pFile->shared->bReserved = FALSE;
33476 if (pFile->local.bPending){
33477 pFile->shared->bPending = FALSE;
33479 if (pFile->local.bExclusive){
33480 pFile->shared->bExclusive = FALSE;
33484 osUnmapViewOfFile(pFile->shared);
33485 osCloseHandle(pFile->hShared);
33488 winceMutexRelease(pFile->hMutex);
33489 osCloseHandle(pFile->hMutex);
33490 pFile->hMutex = NULL;
33504 winFile *pFile = HANDLE_TO_WINFILE(phFile);
33510 if (!pFile->hMutex) return TRUE;
33511 winceMutexAcquire(pFile->hMutex);
33516 if (pFile->shared->nReaders == 0 && pFile->shared->bExclusive == 0){
33517 pFile->shared->bExclusive = TRUE;
33518 pFile->local.bExclusive = TRUE;
33526 if (pFile->shared->bExclusive == 0){
33527 pFile->local.nReaders ++;
33528 if (pFile->local.nReaders == 1){
33529 pFile->shared->nReaders ++;
33538 if (pFile->shared->bPending == 0) {
33539 pFile->shared->bPending = TRUE;
33540 pFile->local.bPending = TRUE;
33547 if (pFile->shared->bReserved == 0) {
33548 pFile->shared->bReserved = TRUE;
33549 pFile->local.bReserved = TRUE;
33554 winceMutexRelease(pFile->hMutex);
33568 winFile *pFile = HANDLE_TO_WINFILE(phFile);
33574 if (!pFile->hMutex) return TRUE;
33575 winceMutexAcquire(pFile->hMutex);
33580 if (pFile->local.bExclusive){
33582 pFile->local.bExclusive = FALSE;
33583 pFile->shared->bExclusive = FALSE;
33588 else if (pFile->local.nReaders){
33590 pFile->local.nReaders --;
33591 if (pFile->local.nReaders == 0)
33593 pFile->shared->nReaders --;
33601 if (pFile->local.bPending){
33602 pFile->local.bPending = FALSE;
33603 pFile->shared->bPending = FALSE;
33609 if (pFile->local.bReserved) {
33610 pFile->local.bReserved = FALSE;
33611 pFile->shared->bReserved = FALSE;
33616 winceMutexRelease(pFile->hMutex);
33665 static int seekWinFile(winFile *pFile, sqlite3_int64 iOffset){
33681 dwRet = osSetFilePointer(pFile->h, lowerBits, &upperBits, FILE_BEGIN);
33685 pFile->lastErrno = lastErrno;
33686 winLogError(SQLITE_IOERR_SEEK, pFile->lastErrno,
33687 "seekWinFile", pFile->zPath);
33707 winFile *pFile = (winFile*)id;
33710 assert( pFile->pShm==0 );
33711 OSTRACE(("CLOSE %d\n", pFile->h));
33713 rc = osCloseHandle(pFile->h);
33718 winceDestroyLock(pFile);
33719 if( pFile->zDeleteOnClose ){
33722 osDeleteFileW(pFile->zDeleteOnClose)==0
33723 && osGetFileAttributesW(pFile->zDeleteOnClose)!=0xffffffff
33728 sqlite3_free(pFile->zDeleteOnClose);
33731 OSTRACE(("CLOSE %d %s\n", pFile->h, rc ? "ok" : "failed"));
33735 "winClose", pFile->zPath);
33749 winFile *pFile = (winFile*)id; /* file handle */
33755 OSTRACE(("READ %d lock=%d\n", pFile->h, pFile->locktype));
33757 if( seekWinFile(pFile, offset) ){
33760 while( !osReadFile(pFile->h, pBuf, amt, &nRead, 0) ){
33763 pFile->lastErrno = lastErrno;
33764 return winLogError(SQLITE_IOERR_READ, pFile->lastErrno,
33765 "winRead", pFile->zPath);
33788 winFile *pFile = (winFile*)id; /* File handle */
33792 assert( pFile );
33796 OSTRACE(("WRITE %d lock=%d\n", pFile->h, pFile->locktype));
33798 rc = seekWinFile(pFile, offset);
33806 if( !osWriteFile(pFile->h, aRem, nRem, &nWrite, 0) ){
33815 pFile->lastErrno = lastErrno;
33821 if( ( pFile->lastErrno==ERROR_HANDLE_DISK_FULL )
33822 || ( pFile->lastErrno==ERROR_DISK_FULL )){
33825 return winLogError(SQLITE_IOERR_WRITE, pFile->lastErrno,
33826 "winWrite", pFile->zPath);
33837 winFile *pFile = (winFile*)id; /* File handle object */
33840 assert( pFile );
33842 OSTRACE(("TRUNCATE %d %lld\n", pFile->h, nByte));
33850 if( pFile->szChunk>0 ){
33851 nByte = ((nByte + pFile->szChunk - 1)/pFile->szChunk) * pFile->szChunk;
33855 if( seekWinFile(pFile, nByte) ){
33856 rc = winLogError(SQLITE_IOERR_TRUNCATE, pFile->lastErrno,
33857 "winTruncate1", pFile->zPath);
33858 }else if( 0==osSetEndOfFile(pFile->h) ){
33859 pFile->lastErrno = osGetLastError();
33860 rc = winLogError(SQLITE_IOERR_TRUNCATE, pFile->lastErrno,
33861 "winTruncate2", pFile->zPath);
33864 OSTRACE(("TRUNCATE %d %lld %s\n", pFile->h, nByte, rc ? "failed" : "ok"));
33893 winFile *pFile = (winFile*)id;
33898 assert( pFile );
33904 OSTRACE(("SYNC %d lock=%d\n", pFile->h, pFile->locktype));
33926 rc = osFlushFileBuffers(pFile->h);
33931 pFile->lastErrno = osGetLastError();
33932 return winLogError(SQLITE_IOERR_FSYNC, pFile->lastErrno,
33933 "winSync", pFile->zPath);
33944 winFile *pFile = (winFile*)id;
33949 lowerBits = osGetFileSize(pFile->h, &upperBits);
33953 pFile->lastErrno = lastErrno;
33954 return winLogError(SQLITE_IOERR_FSTAT, pFile->lastErrno,
33955 "winFileSize", pFile->zPath);
33973 static int getReadLock(winFile *pFile){
33980 res = osLockFileEx(pFile->h, LOCKFILE_FAIL_IMMEDIATELY,
33988 pFile->sharedLockByte = (short)((lk & 0x7fffffff)%(SHARED_SIZE - 1));
33989 res = osLockFile(pFile->h, SHARED_FIRST+pFile->sharedLockByte, 0, 1, 0);
33993 pFile->lastErrno = osGetLastError();
34002 static int unlockReadLock(winFile *pFile){
34006 res = osUnlockFile(pFile->h, SHARED_FIRST, 0, SHARED_SIZE, 0);
34011 res = osUnlockFile(pFile->h, SHARED_FIRST + pFile->sharedLockByte, 0, 1, 0);
34015 pFile->lastErrno = lastErrno;
34016 winLogError(SQLITE_IOERR_UNLOCK, pFile->lastErrno,
34017 "unlockReadLock", pFile->zPath);
34053 winFile *pFile = (winFile*)id;
34058 pFile->h, locktype, pFile->locktype, pFile->sharedLockByte));
34064 if( pFile->locktype>=locktype ){
34070 assert( pFile->locktype!=NO_LOCK || locktype==SHARED_LOCK );
34072 assert( locktype!=RESERVED_LOCK || pFile->locktype==SHARED_LOCK );
34078 newLocktype = pFile->locktype;
34079 if( (pFile->locktype==NO_LOCK)
34081 && (pFile->locktype==RESERVED_LOCK))
34084 while( cnt-->0 && (res = osLockFile(pFile->h, PENDING_BYTE, 0, 1, 0))==0 ){
34103 assert( pFile->locktype==NO_LOCK );
34104 res = getReadLock(pFile);
34115 assert( pFile->locktype==SHARED_LOCK );
34116 res = osLockFile(pFile->h, RESERVED_BYTE, 0, 1, 0);
34134 assert( pFile->locktype>=SHARED_LOCK );
34135 res = unlockReadLock(pFile);
34137 res = osLockFile(pFile->h, SHARED_FIRST, 0, SHARED_SIZE, 0);
34143 getReadLock(pFile);
34151 osUnlockFile(pFile->h, PENDING_BYTE, 0, 1, 0);
34160 OSTRACE(("LOCK FAILED %d trying for %d but got %d\n", pFile->h,
34162 pFile->lastErrno = lastErrno;
34165 pFile->locktype = (u8)newLocktype;
34176 winFile *pFile = (winFile*)id;
34181 if( pFile->locktype>=RESERVED_LOCK ){
34183 OSTRACE(("TEST WR-LOCK %d %d (local)\n", pFile->h, rc));
34185 rc = osLockFile(pFile->h, RESERVED_BYTE, 0, 1, 0);
34187 osUnlockFile(pFile->h, RESERVED_BYTE, 0, 1, 0);
34190 OSTRACE(("TEST WR-LOCK %d %d (remote)\n", pFile->h, rc));
34209 winFile *pFile = (winFile*)id;
34211 assert( pFile!=0 );
34213 OSTRACE(("UNLOCK %d to %d was %d(%d)\n", pFile->h, locktype,
34214 pFile->locktype, pFile->sharedLockByte));
34215 type = pFile->locktype;
34217 osUnlockFile(pFile->h, SHARED_FIRST, 0, SHARED_SIZE, 0);
34218 if( locktype==SHARED_LOCK && !getReadLock(pFile) ){
34222 "winUnlock", pFile->zPath);
34226 osUnlockFile(pFile->h, RESERVED_BYTE, 0, 1, 0);
34229 unlockReadLock(pFile);
34232 osUnlockFile(pFile->h, PENDING_BYTE, 0, 1, 0);
34234 pFile->locktype = (u8)locktype;
34244 static void winModeBit(winFile *pFile, unsigned char mask, int *pArg){
34246 *pArg = (pFile->ctrlFlags & mask)!=0;
34248 pFile->ctrlFlags &= ~mask;
34250 pFile->ctrlFlags |= mask;
34258 winFile *pFile = (winFile*)id;
34261 *(int*)pArg = pFile->locktype;
34265 *(int*)pArg = (int)pFile->lastErrno;
34269 pFile->szChunk = *(int *)pArg;
34273 if( pFile->szChunk>0 ){
34289 winModeBit(pFile, WINFILE_PERSIST_WAL, (int*)pArg);
34293 winModeBit(pFile, WINFILE_PSOW, (int*)pArg);
34465 winShmNode *pFile, /* Apply locks to this open shared-memory segment */
34475 assert( sqlite3_mutex_held(pFile->mutex) || pFile->nRef==0 );
34486 rc = osUnlockFileEx(pFile->hFile.h, 0, nByte, 0, &ovlp);
34488 rc = osLockFileEx(pFile->hFile.h, dwFlags, 0, nByte, 0, &ovlp);
34494 pFile->lastErrno = osGetLastError();
34499 pFile->hFile.h,
34502 pFile->lastErrno));
35127 winFile *pFile = (winFile*)id;
35187 pFile->h = INVALID_HANDLE_VALUE;
35287 pFile->lastErrno = lastErrno;
35288 winLogError(SQLITE_CANTOPEN, pFile->lastErrno, "winOpen", zUtf8Name);
35306 memset(pFile, 0, sizeof(*pFile));
35307 pFile->pMethod = &winIoMethod;
35308 pFile->h = h;
35309 pFile->lastErrno = NO_ERROR;
35310 pFile->pVfs = pVfs;
35311 pFile->pShm = 0;
35312 pFile->zPath = zName;
35314 pFile->ctrlFlags |= WINFILE_PSOW;
35319 && !winceCreateLock(zName, pFile)
35326 pFile->zDeleteOnClose = zConverted;
41838 sqlite3_file *pFile, /* Write the file descriptor here */
41849 rc = sqlite3OsOpen(pPager->pVfs, 0, pFile, vfsFlags, 0);
41850 assert( rc!=SQLITE_OK || isOpen(pFile) );
57935 static int backupTruncateFile(sqlite3_file *pFile, i64 iSize){
57937 int rc = sqlite3OsFileSize(pFile, &iCurrent);
57939 rc = sqlite3OsTruncate(pFile, iSize);
58095 sqlite3_file * const pFile = sqlite3PagerFile(pDestPager);
58099 assert( pFile );
58125 rc = sqlite3OsWrite(pFile, zData, pgszSrc, iOff);
58130 rc = backupTruncateFile(pFile, iSize);
71762 sqlite3_file *pFile; /* File iterator is reading from */
71818 rc = sqlite3OsRead(pIter->pFile, pIter->aAlloc, nRead, pIter->iReadOff);
71833 pIter->pFile, &pIter->aAlloc[nRead], nRead2, pIter->iReadOff+nRead
71854 sqlite3_file *pFile, /* File to write to */
71863 rc = sqlite3OsWrite(pFile, aVarint, nVarint, *piOffset);
71881 sqlite3_file *pFile, /* File to read from */
71889 rc = sqlite3OsRead(pFile, aVarint, 9, iOff);
71914 pIter->pFile = pSorter->pTemp1;
72005 if( p1->pFile==0 ){
72007 }else if( p2->pFile==0 ){
72384 assert( rc!=SQLITE_OK || pSorter->aIter[ pSorter->aTree[1] ].pFile );
72404 assert( pIter->pFile );
72431 *pbEof = (pSorter->aIter[pSorter->aTree[1]].pFile==0);
72451 *pbEof = (pSorter->aIter[pSorter->aTree[1]].pFile==0);
92890 sqlite3_file *pFile = sqlite3PagerFile(pPager);
92891 sqlite3OsFileControlHint(pFile, SQLITE_GET_LOCKPROXYFILE,
92903 sqlite3_file *pFile = sqlite3PagerFile(pPager);
92906 res=sqlite3OsFileControl(pFile, SQLITE_SET_LOCKPROXYFILE,
92909 res=sqlite3OsFileControl(pFile, SQLITE_SET_LOCKPROXYFILE,