/ Check-in [05bf8a0b]
Login

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

Overview
Comment:In the multiplexor shim, when using 8+3 filenames, begin numbering journal overflow files with 101 instead of 001 to avoid name collisions with the main database file.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 05bf8a0b17a13a581ac973dc84ceaf66532d7f92
User & Date: drh 2011-12-11 22:44:09
Context
2011-12-12
16:51
Add magic comments to shell.c to make it easier for scripts to insert additional version information displays for custom builds. check-in: 9b2691aa user: drh tags: trunk
2011-12-11
22:44
In the multiplexor shim, when using 8+3 filenames, begin numbering journal overflow files with 101 instead of 001 to avoid name collisions with the main database file. check-in: 05bf8a0b user: drh tags: trunk
21:51
Update comments describing the flattening optimization in select.c. check-in: dab4c137 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/test_multiplex.c.

300
301
302
303
304
305
306







307
308
309
310
311
312
313
    }
    memcpy(z, pGroup->zName, n+1);
    if( iChunk>0 ){
#ifdef SQLITE_ENABLE_8_3_NAMES
      int i;
      for(i=n-1; i>0 && i>=n-4 && z[i]!='.'; i--){}
      if( i>=n-4 ) n = i+1;







#endif
      sqlite3_snprintf(4,&z[n],"%03d",iChunk);
    }
  }
  return SQLITE_OK;
}








>
>
>
>
>
>
>







300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
    }
    memcpy(z, pGroup->zName, n+1);
    if( iChunk>0 ){
#ifdef SQLITE_ENABLE_8_3_NAMES
      int i;
      for(i=n-1; i>0 && i>=n-4 && z[i]!='.'; i--){}
      if( i>=n-4 ) n = i+1;
      if( pGroup->flags & (SQLITE_OPEN_MAIN_JOURNAL|SQLITE_OPEN_TEMP_JOURNAL) ){
        /* The extensions on overflow files for main databases are 001, 002,
        ** 003 and so forth.  To avoid name collisions, add 100 to the 
        ** extensions of journal files so that they are 101, 102, 103, ....
        */
        iChunk += 100;
      }
#endif
      sqlite3_snprintf(4,&z[n],"%03d",iChunk);
    }
  }
  return SQLITE_OK;
}