Lines Matching defs:zSuper

15335 SQLITE_PRIVATE int sqlite3PagerCommitPhaseOne(Pager*,const char *zSuper, int);
15337 SQLITE_PRIVATE int sqlite3PagerSync(Pager *pPager, const char *zSuper);
56791 ** zSuper must point to a buffer of at least nSuper bytes allocated by
56799 ** file, then it is copied into the buffer pointed to by zSuper. A
56804 ** zSuper[0] is set to 0 and SQLITE_OK returned.
56809 static int readSuperJournal(sqlite3_file *pJrnl, char *zSuper, u32 nSuper){
56816 zSuper[0] = '\0';
56827 || SQLITE_OK!=(rc = sqlite3OsRead(pJrnl, zSuper, len, szJ-16-len))
56834 cksum -= zSuper[u];
56844 zSuper[len] = '\0';
56845 zSuper[len+1] = '\0';
57188 ** If zSuper is a NULL pointer (occurs for a single database transaction),
57191 static int writeSuperJournal(Pager *pPager, const char *zSuper){
57193 int nSuper; /* Length of string zSuper */
57196 u32 cksum = 0; /* Checksum of string zSuper */
57201 if( !zSuper
57210 /* Calculate the length in bytes and the checksum of zSuper */
57211 for(nSuper=0; zSuper[nSuper]; nSuper++){
57212 cksum += zSuper[nSuper];
57228 || (0 != (rc = sqlite3OsWrite(pPager->jfd, zSuper, nSuper, iHdrOff+4)))
58005 ** Parameter zSuper is the name of a super-journal file. A single journal
58010 ** Argument zSuper may point to Pager.pTmpSpace. So that buffer is not
58030 ** file zSuper
58034 ** no such child journal can be found, file zSuper is deleted from
58047 static int pager_delsuper(Pager *pPager, const char *zSuper){
58068 rc = sqlite3OsOpen(pVfs, zSuper, pSuper, flags, 0);
58122 c = zSuperPtr[0]!=0 && strcmp(zSuperPtr, zSuper)==0;
58132 rc = sqlite3OsDelete(pVfs, zSuper, 0);
58317 char *zSuper = 0; /* Name of super-journal file if any */
58342 zSuper = pPager->pTmpSpace;
58343 rc = readSuperJournal(pPager->jfd, zSuper, pPager->pVfs->mxPathname+1);
58344 if( rc==SQLITE_OK && zSuper[0] ){
58345 rc = sqlite3OsAccess(pVfs, zSuper, SQLITE_ACCESS_EXISTS, &res);
58347 zSuper = 0;
58481 zSuper = &pPager->pTmpSpace[4];
58482 rc = readSuperJournal(pPager->jfd, zSuper, pPager->pVfs->mxPathname+1);
58491 rc = pager_end_transaction(pPager, zSuper[0]!='\0', 0);
58494 if( rc==SQLITE_OK && zSuper[0] && res ){
58498 assert( zSuper==&pPager->pTmpSpace[4] );
58499 memset(&zSuper[-4], 0, 4);
58500 rc = pager_delsuper(pPager, zSuper);
61907 SQLITE_PRIVATE int sqlite3PagerSync(Pager *pPager, const char *zSuper){
61909 void *pArg = (void*)zSuper;
61947 ** Sync the database file for the pager pPager. zSuper points to the name
61949 ** journal file. zSuper may be NULL, which is interpreted as no
61964 ** Note that if zSuper==NULL, this does not overwrite a previous value
61974 const char *zSuper, /* If not NULL, the super-journal name */
61992 PAGERTRACE(("DATABASE SYNC: File=%s zSuper=%s nSize=%d\n",
61993 pPager->zFilename, zSuper, pPager->dbSize));
62032 int bBatch = zSuper==0 /* An SQLITE_IOCAP_BATCH_ATOMIC commit */
62070 if( !zSuper && isOpen(pPager->jfd)
62091 if( zSuper ){
62103 ** or if zSuper is NULL (no super-journal), then this call is a no-op.
62105 rc = writeSuperJournal(pPager, zSuper);
62173 rc = sqlite3PagerSync(pPager, zSuper);
85407 char *zSuper = 0; /* File-name for the super-journal */
85417 zSuper = sqlite3MPrintf(db, "%.4c%s%.16c", 0,zMainFile,0);
85418 if( zSuper==0 ) return SQLITE_NOMEM_BKPT;
85419 zSuper += 4;
85424 sqlite3_log(SQLITE_FULL, "MJ delete: %s", zSuper);
85425 sqlite3OsDelete(pVfs, zSuper, 0);
85428 sqlite3_log(SQLITE_FULL, "MJ collide: %s", zSuper);
85433 sqlite3_snprintf(13, &zSuper[nMainFile], "-mj%06X9%02X",
85437 assert( zSuper[sqlite3Strlen30(zSuper)-3]=='9' );
85438 sqlite3FileSuffix3(zMainFile, zSuper);
85439 rc = sqlite3OsAccess(pVfs, zSuper, SQLITE_ACCESS_EXISTS, &res);
85443 rc = sqlite3OsOpenMalloc(pVfs, zSuper, &pSuperJrnl,
85449 sqlite3DbFree(db, zSuper-4);
85471 sqlite3OsDelete(pVfs, zSuper, 0);
85472 sqlite3DbFree(db, zSuper-4);
85485 sqlite3OsDelete(pVfs, zSuper, 0);
85486 sqlite3DbFree(db, zSuper-4);
85503 rc = sqlite3BtreeCommitPhaseOne(pBt, zSuper);
85509 sqlite3DbFree(db, zSuper-4);
85517 rc = sqlite3OsDelete(pVfs, zSuper, 1);
85518 sqlite3DbFree(db, zSuper-4);
85519 zSuper = 0;