/ Check-in [e44e2677]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix the xDelete implementation of the multiplexor VFS so that it correctly deletes overflow WAL files.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e44e26771e5aa48f3bfa14d6db3e669b5b2a1e73
User & Date: drh 2012-02-27 14:28:50
Context
2012-02-28
11:52
Fix a case where an error code was being overwritten in multiplexDelete(). check-in: c267893a user: dan tags: trunk
2012-02-27
14:28
Fix the xDelete implementation of the multiplexor VFS so that it correctly deletes overflow WAL files. check-in: e44e2677 user: drh tags: trunk
2012-02-24
16:13
Separate multiplexor overflow pages for -wal and -journal files into separate namespaces when in 8+3 filename mode. check-in: d6850667 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/test_multiplex.c.

   653    653           multiplexFilename(zName, nName, SQLITE_OPEN_MAIN_JOURNAL, ++iChunk, z);
   654    654           rc = pOrigVfs->xAccess(pOrigVfs, z, SQLITE_ACCESS_EXISTS, &bExists);
   655    655         }while( rc==SQLITE_OK && bExists );
   656    656         while( rc==SQLITE_OK && iChunk>1 ){
   657    657           multiplexFilename(zName, nName, SQLITE_OPEN_MAIN_JOURNAL, --iChunk, z);
   658    658           rc = pOrigVfs->xDelete(pOrigVfs, z, syncDir);
   659    659         }
          660  +      iChunk = 0;
          661  +      do{
          662  +        multiplexFilename(zName, nName, SQLITE_OPEN_WAL, ++iChunk, z);
          663  +        rc = pOrigVfs->xAccess(pOrigVfs, z, SQLITE_ACCESS_EXISTS, &bExists);
          664  +      }while( rc==SQLITE_OK && bExists );
          665  +      while( rc==SQLITE_OK && iChunk>1 ){
          666  +        multiplexFilename(zName, nName, SQLITE_OPEN_WAL, --iChunk, z);
          667  +        rc = pOrigVfs->xDelete(pOrigVfs, z, syncDir);
          668  +      }
   660    669       }
   661    670       sqlite3_free(z);
   662    671     }
   663    672     return rc;
   664    673   }
   665    674   
   666    675   static int multiplexAccess(sqlite3_vfs *a, const char *b, int c, int *d){