/ Check-in [a9fcb46b]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Fix the multiplexor so that it works with WAL mode and 8+3 filenames.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a9fcb46bc08c29aebaf3bc999f45846c3c320f68
User & Date: drh 2012-02-24 15:57:13
Context
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
15:57
Fix the multiplexor so that it works with WAL mode and 8+3 filenames. check-in: a9fcb46b user: drh tags: trunk
14:33
Add #ifdef SQLITE_ENABLE_ZIPVFS around those bits of code that are only used by ZIPVFS. check-in: 3130275c user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/test_multiplex.c.

252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
  int n = nBase;
  memcpy(zOut, zBase, n+1);
  if( iChunk!=0 && iChunk!=SQLITE_MULTIPLEX_JOURNAL_8_3_OFFSET ){
#ifdef SQLITE_ENABLE_8_3_NAMES
    int i;
    for(i=n-1; i>0 && i>=n-4 && zOut[i]!='.'; i--){}
    if( i>=n-4 ) n = i+1;
    if( flags & SQLITE_OPEN_MAIN_JOURNAL ){
      /* The extensions on overflow files for main databases are 001, 002,
       ** 003 and so forth.  To avoid name collisions, add 400 to the 
       ** extensions of journal files so that they are 401, 402, 403, ....
       */
      iChunk += SQLITE_MULTIPLEX_JOURNAL_8_3_OFFSET;
    }
#endif







|







252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
  int n = nBase;
  memcpy(zOut, zBase, n+1);
  if( iChunk!=0 && iChunk!=SQLITE_MULTIPLEX_JOURNAL_8_3_OFFSET ){
#ifdef SQLITE_ENABLE_8_3_NAMES
    int i;
    for(i=n-1; i>0 && i>=n-4 && zOut[i]!='.'; i--){}
    if( i>=n-4 ) n = i+1;
    if( flags & (SQLITE_OPEN_MAIN_JOURNAL|SQLITE_OPEN_WAL) ){
      /* The extensions on overflow files for main databases are 001, 002,
       ** 003 and so forth.  To avoid name collisions, add 400 to the 
       ** extensions of journal files so that they are 401, 402, 403, ....
       */
      iChunk += SQLITE_MULTIPLEX_JOURNAL_8_3_OFFSET;
    }
#endif