1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-09 14:21:03 +03:00

Fix the multiplexor so that it works with WAL mode and 8+3 filenames.

FossilOrigin-Name: a9fcb46bc08c29aebaf3bc999f45846c3c320f68
This commit is contained in:
drh
2012-02-24 15:57:13 +00:00
parent 70708600b5
commit 1a3dd3d445
3 changed files with 8 additions and 8 deletions

View File

@@ -256,7 +256,7 @@ static void multiplexFilename(
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 ){
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, ....