Lines Matching refs:jfd
37445 sqlite3_file *jfd; /* File descriptor for main journal */
37622 assert( p->journalMode!=PAGER_JOURNALMODE_OFF || !isOpen(p->jfd) );
37682 assert( isOpen(p->jfd)
37696 assert( isOpen(p->jfd)
37707 assert( isOpen(p->jfd)
38086 assert( isOpen(pPager->jfd) );
38092 rc = sqlite3OsTruncate(pPager->jfd, 0);
38095 rc = sqlite3OsWrite(pPager->jfd, zeroHdr, sizeof(zeroHdr), 0);
38098 rc = sqlite3OsSync(pPager->jfd, SQLITE_SYNC_DATAONLY|pPager->syncFlags);
38109 rc = sqlite3OsFileSize(pPager->jfd, &sz);
38111 rc = sqlite3OsTruncate(pPager->jfd, iLimit);
38140 assert( isOpen(pPager->jfd) ); /* Journal file must be open. */
38226 rc = sqlite3OsWrite(pPager->jfd, zHeader, nHeader, pPager->journalOff);
38262 assert( isOpen(pPager->jfd) ); /* Journal file must be open. */
38280 rc = sqlite3OsRead(pPager->jfd, aMagic, sizeof(aMagic), iHdrOff);
38293 if( SQLITE_OK!=(rc = read32bits(pPager->jfd, iHdrOff+8, pNRec))
38294 || SQLITE_OK!=(rc = read32bits(pPager->jfd, iHdrOff+12, &pPager->cksumInit))
38295 || SQLITE_OK!=(rc = read32bits(pPager->jfd, iHdrOff+16, pDbSize))
38305 if( SQLITE_OK!=(rc = read32bits(pPager->jfd, iHdrOff+20, &iSectorSize))
38306 || SQLITE_OK!=(rc = read32bits(pPager->jfd, iHdrOff+24, &iPageSize))
38393 assert( isOpen(pPager->jfd) );
38413 if( (0 != (rc = write32bits(pPager->jfd, iHdrOff, PAGER_MJ_PGNO(pPager))))
38414 || (0 != (rc = sqlite3OsWrite(pPager->jfd, zMaster, nMaster, iHdrOff+4)))
38415 || (0 != (rc = write32bits(pPager->jfd, iHdrOff+4+nMaster, nMaster)))
38416 || (0 != (rc = write32bits(pPager->jfd, iHdrOff+4+nMaster+4, cksum)))
38417 || (0 != (rc = sqlite3OsWrite(pPager->jfd, aJournalMagic, 8, iHdrOff+4+nMaster+8)))
38433 if( SQLITE_OK==(rc = sqlite3OsFileSize(pPager->jfd, &jrnlSize))
38436 rc = sqlite3OsTruncate(pPager->jfd, pPager->journalOff);
38532 assert( !isOpen(pPager->jfd) );
38553 sqlite3OsClose(pPager->jfd);
38704 assert( isOpen(pPager->jfd) || pPager->pInJournal==0 );
38705 if( isOpen(pPager->jfd) ){
38709 if( sqlite3IsMemJournal(pPager->jfd) ){
38711 sqlite3OsClose(pPager->jfd);
38716 rc = sqlite3OsTruncate(pPager->jfd, 0);
38734 sqlite3OsClose(pPager->jfd);
38903 sqlite3_file *jfd; /* The file descriptor for the journal file */
38929 jfd = isMainJrnl ? pPager->jfd : pPager->sjfd;
38930 rc = read32bits(jfd, *pOffset, &pgno);
38932 rc = sqlite3OsRead(jfd, (u8*)aData, pPager->pageSize, (*pOffset)+4);
38949 rc = read32bits(jfd, (*pOffset)-4, &cksum);
39403 assert( isOpen(pPager->jfd) );
39404 rc = sqlite3OsFileSize(pPager->jfd, &szJ);
39421 rc = readMasterJournal(pPager->jfd, zMaster, pPager->pVfs->mxPathname+1);
39550 rc = readMasterJournal(pPager->jfd, zMaster, pPager->pVfs->mxPathname+1);
40512 rc = sqlite3OsSync(pPager->jfd, SQLITE_SYNC_NORMAL);
40515 rc = sqlite3OsFileSize(pPager->jfd, &pPager->journalHdr);
40560 if( isOpen(pPager->jfd) ){
40569 sqlite3OsClose(pPager->jfd);
40579 assert( !isOpen(pPager->jfd) && !isOpen(pPager->sjfd) );
40650 if( isOpen(pPager->jfd) && pPager->journalMode!=PAGER_JOURNALMODE_MEMORY ){
40652 assert( isOpen(pPager->jfd) );
40685 rc = sqlite3OsRead(pPager->jfd, aMagic, 8, iNextHdrOffset);
40688 rc = sqlite3OsWrite(pPager->jfd, &zerobyte, 1, iNextHdrOffset);
40708 rc = sqlite3OsSync(pPager->jfd, pPager->syncFlags);
40713 pPager->jfd, zHeader, sizeof(zHeader), pPager->journalHdr
40720 rc = sqlite3OsSync(pPager->jfd, pPager->syncFlags|
40899 assert( isOpen(pPager->jfd) || pagerUseWal(pPager) );
41191 pPager->jfd = (sqlite3_file*)(pPtr += journalFileSize);
41193 assert( EIGHT_BYTE_ALIGNMENT(pPager->jfd) );
41384 int jrnlOpen = !!isOpen(pPager->jfd);
41390 assert( jrnlOpen==0 || ( sqlite3OsDeviceCharacteristics(pPager->jfd) &
41437 rc = sqlite3OsOpen(pVfs, pPager->zJournal, pPager->jfd, f, &f);
41441 rc = sqlite3OsRead(pPager->jfd, (void *)&first, 1, 0);
41446 sqlite3OsClose(pPager->jfd);
41567 if( !isOpen(pPager->jfd) ){
41576 rc = sqlite3OsOpen(pVfs, pPager->zJournal, pPager->jfd, f, &fout);
41577 assert( rc!=SQLITE_OK || isOpen(pPager->jfd) );
41580 sqlite3OsClose(pPager->jfd);
41593 if( isOpen(pPager->jfd) ){
41945 if( !isOpen(pPager->jfd) ){
41947 sqlite3MemJournalOpen(pPager->jfd);
41957 pVfs, pPager->zJournal, pPager->jfd, flags, jrnlBufferSize(pPager)
41960 rc = sqlite3OsOpen(pVfs, pPager->zJournal, pPager->jfd, flags, 0);
41963 assert( rc!=SQLITE_OK || isOpen(pPager->jfd) );
42136 if( pPg->pgno<=pPager->dbOrigSize && isOpen(pPager->jfd) ){
42159 rc = write32bits(pPager->jfd, iOff, pPg->pgno);
42161 rc = sqlite3OsWrite(pPager->jfd, pData2, pPager->pageSize, iOff+4);
42163 rc = write32bits(pPager->jfd, iOff+pPager->pageSize+4, cksum);
42589 assert( isOpen(pPager->jfd)
42593 if( !zMaster && isOpen(pPager->jfd)
42606 rc = sqlite3JournalCreate(pPager->jfd);
42799 }else if( !isOpen(pPager->jfd) || pPager->eState==PAGER_WRITER_LOCKED ){
42923 if( isOpen(pPager->jfd) && pPager->journalOff>0 ){
43012 else if( pagerUseWal(pPager) || isOpen(pPager->jfd) ){
43358 sqlite3OsClose(pPager->jfd);
43404 if( NEVER(isOpen(pPager->jfd) && pPager->journalOff>0) ) return 0;
43549 sqlite3OsClose(pPager->jfd);