/ Check-in [e9177f7d]
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:Call sqlite3_log() with an appropriate message if unable to find a unique master-journal filename.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | nx-devkit
Files: files | file ages | folders
SHA1: e9177f7d4ec19f0841d0613990d2fb5725700ba1
User & Date: drh 2011-12-16 01:30:15
Context
2011-12-16
04:57
The xTruncate method for the multiplexor now changes surplus overflow files to zero-length by default. Or if the "truncate" query parameter is used, it actually deletes the surplus overflow files. This allows VACUUM to shrink the database again. check-in: 5aefef04 user: drh tags: nx-devkit
01:30
Call sqlite3_log() with an appropriate message if unable to find a unique master-journal filename. check-in: e9177f7d user: drh tags: nx-devkit
01:21
A better solution to being unable to find a unique master-journal filename: just delete an existing master-journal and reuse it. check-in: 2685c2b9 user: drh tags: nx-devkit
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vdbeaux.c.

1830
1831
1832
1833
1834
1835
1836

1837
1838
1839
1840
1841
1842
1843
    /* Select a master journal file name */
    nMainFile = sqlite3Strlen30(zMainFile);
    zMaster = sqlite3MPrintf(db, "%s-mjXXXXXX9XX", zMainFile);
    if( zMaster==0 ) return SQLITE_NOMEM;
    do {
      u32 iRandom;
      if( retryCount++>100 ){

        sqlite3OsDelete(pVfs, zMaster, 0);
        break;
      }
      sqlite3_randomness(sizeof(iRandom), &iRandom);
      sqlite3_snprintf(13, &zMaster[nMainFile], "-mj%06X9%02X",
                               (iRandom>>8)&0xffffff, iRandom&0xff);
      /* The antipenultimate character of the master journal name must







>







1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
    /* Select a master journal file name */
    nMainFile = sqlite3Strlen30(zMainFile);
    zMaster = sqlite3MPrintf(db, "%s-mjXXXXXX9XX", zMainFile);
    if( zMaster==0 ) return SQLITE_NOMEM;
    do {
      u32 iRandom;
      if( retryCount++>100 ){
        sqlite3_log(SQLITE_FULL, "cannot find unique master-journal");
        sqlite3OsDelete(pVfs, zMaster, 0);
        break;
      }
      sqlite3_randomness(sizeof(iRandom), &iRandom);
      sqlite3_snprintf(13, &zMaster[nMainFile], "-mj%06X9%02X",
                               (iRandom>>8)&0xffffff, iRandom&0xff);
      /* The antipenultimate character of the master journal name must