mirror of
https://github.com/sqlite/sqlite.git
synced 2026-01-06 08:01:16 +03:00
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. FossilOrigin-Name: 05bf8a0b17a13a581ac973dc84ceaf66532d7f92
This commit is contained in:
@@ -304,6 +304,13 @@ static int multiplexSubFilename(multiplexGroup *pGroup, int iChunk){
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user