/ Check-in [d30ceeb8]
Login

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

Overview
Comment:Remove a redundant OOM test from the sqlite_stat2 analysis loader.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d30ceeb8b303e2ebfab2855beb973da606a97fa9
User & Date: drh 2009-08-20 23:05:32
Context
2009-08-21
02:07
Updates for test_init.c for configure and other consistency changes. check-in: 3ba316e9 user: shane tags: trunk
2009-08-20
23:05
Remove a redundant OOM test from the sqlite_stat2 analysis loader. check-in: d30ceeb8 user: drh tags: trunk
20:05
Simplifications to the range-scan logic in support of structural testing. check-in: bbbee810 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/analyze.c.

   602    602                 pIdx->aSample = (IndexSample *)sqlite3DbMallocZero(dbMem, sz);
   603    603                 if( pIdx->aSample==0 ){
   604    604                   db->mallocFailed = 1;
   605    605                   break;
   606    606                 }
   607    607               }
   608    608   
   609         -            if( pIdx->aSample ){
          609  +            assert( pIdx->aSample );
          610  +            {
   610    611                 IndexSample *pSample = &pIdx->aSample[iSample];
   611    612                 pSample->eType = eType;
   612    613                 if( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT ){
   613    614                   pSample->u.r = sqlite3_column_double(pStmt, 2);
   614    615                 }else if( eType==SQLITE_TEXT || eType==SQLITE_BLOB ){
   615    616                   const char *z = (const char *)(
   616    617                       (eType==SQLITE_BLOB) ?