/ Check-in [781453c6]
Login

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

Overview
Comment:In the multiplexor extension, improve the error logging when a chunk fails to open.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:781453c686656a7bd4a274a3b3204ceb6ecae8df
User & Date: drh 2012-04-04 13:43:13
Context
2012-04-04
13:58
Fix the multiplexor logging so that it works with SQLITE_ENABLE_8_3_NAMES. check-in: 9e1e2fe2 user: drh tags: trunk
13:43
In the multiplexor extension, improve the error logging when a chunk fails to open. check-in: 781453c6 user: drh tags: trunk
2012-04-03
18:34
Do not run attempt to run test file fts4merge3.test unless the build includes FTS. check-in: 0506bf86 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/test_multiplex.c.

   325    325   
   326    326   #ifdef SQLITE_ENABLE_8_3_NAMES
   327    327     /* If JOURNAL_8_3_OFFSET is set to (say) 400, then any overflow files are 
   328    328     ** part of a database journal are named db.401, db.402, and so on. A 
   329    329     ** database may therefore not grow to larger than 400 chunks. Attempting
   330    330     ** to open chunk 401 indicates the database is full. */
   331    331     if( iChunk>=SQLITE_MULTIPLEX_JOURNAL_8_3_OFFSET ){
          332  +    sqlite3_log(SQLITE_FULL, "multiplexed chunk overflow: %s", zName);
   332    333       *rc = SQLITE_FULL;
   333    334       return 0;
   334    335     }
   335    336   #endif
   336    337   
   337    338     *rc = multiplexSubFilename(pGroup, iChunk);
   338    339     if( (*rc)==SQLITE_OK && (pSubOpen = pGroup->aReal[iChunk].p)==0 ){
................................................................................
   343    344       }else if( iChunk==0 ){
   344    345         /* Fall through */
   345    346       }else if( pGroup->aReal[iChunk].z==0 ){
   346    347         return 0;
   347    348       }else{
   348    349         *rc = pOrigVfs->xAccess(pOrigVfs, pGroup->aReal[iChunk].z,
   349    350                                 SQLITE_ACCESS_EXISTS, &bExists);
   350         -      if( *rc || !bExists ) return 0;
          351  +     if( *rc || !bExists ){
          352  +        if( *rc ){
          353  +          sqlite3_log(*rc, "multiplexor.xAccess failure on %s",
          354  +                      pGroup->aReal[iChunk].z);
          355  +        }
          356  +        return 0;
          357  +      }
   351    358         flags &= ~SQLITE_OPEN_CREATE;
   352    359       }
   353    360       pSubOpen = sqlite3_malloc( pOrigVfs->szOsFile );
   354    361       if( pSubOpen==0 ){
   355    362         *rc = SQLITE_IOERR_NOMEM;
   356    363         return 0;
   357    364       }
   358    365       pGroup->aReal[iChunk].p = pSubOpen;
   359    366       *rc = pOrigVfs->xOpen(pOrigVfs, pGroup->aReal[iChunk].z, pSubOpen,
   360    367                             flags, pOutFlags);
   361    368       if( (*rc)!=SQLITE_OK ){
          369  +      sqlite3_log(*rc, "multiplexor.xOpen failure on %s",
          370  +                  pGroup->aReal[iChunk].z);
   362    371         sqlite3_free(pSubOpen);
   363    372         pGroup->aReal[iChunk].p = 0;
   364    373         return 0;
   365    374       }
   366    375     }
   367    376     return pSubOpen;
   368    377   }