/ 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 Unified Diffs Show Whitespace Changes Patch

Changes to src/analyze.c.

602
603
604
605
606
607
608
609

610
611
612
613
614
615
616
              pIdx->aSample = (IndexSample *)sqlite3DbMallocZero(dbMem, sz);
              if( pIdx->aSample==0 ){
                db->mallocFailed = 1;
                break;
              }
            }

            if( pIdx->aSample ){

              IndexSample *pSample = &pIdx->aSample[iSample];
              pSample->eType = eType;
              if( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT ){
                pSample->u.r = sqlite3_column_double(pStmt, 2);
              }else if( eType==SQLITE_TEXT || eType==SQLITE_BLOB ){
                const char *z = (const char *)(
                    (eType==SQLITE_BLOB) ?







|
>







602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
              pIdx->aSample = (IndexSample *)sqlite3DbMallocZero(dbMem, sz);
              if( pIdx->aSample==0 ){
                db->mallocFailed = 1;
                break;
              }
            }

            assert( pIdx->aSample );
            {
              IndexSample *pSample = &pIdx->aSample[iSample];
              pSample->eType = eType;
              if( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT ){
                pSample->u.r = sqlite3_column_double(pStmt, 2);
              }else if( eType==SQLITE_TEXT || eType==SQLITE_BLOB ){
                const char *z = (const char *)(
                    (eType==SQLITE_BLOB) ?