/ Check-in [da770a8d]
Login

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

Overview
Comment:Fix compiler warnings. (CVS 6117)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: da770a8dff183b28aca287cafb9c8b82b98ea968
User & Date: drh 2009-01-06 14:19:37
Context
2009-01-06
14:34
Fix a memory leak in test_journal.c (test code). Also remove function pager_truncate_cache(), a wrapper around sqlite3PCacheTruncate(), from pager.c. (CVS 6118) check-in: a64f3db0 user: danielk1977 tags: trunk
14:19
Fix compiler warnings. (CVS 6117) check-in: da770a8d user: drh tags: trunk
13:40
Add some savepoint related test cases and fix a few problems. (CVS 6116) check-in: 8c62ea4f user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pager.h.

     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This header file defines the interface that the sqlite page cache
    13     13   ** subsystem.  The page cache subsystem reads and writes a file a page
    14     14   ** at a time and provides a journal for rollback.
    15     15   **
    16         -** @(#) $Id: pager.h,v 1.91 2009/01/02 18:10:42 drh Exp $
           16  +** @(#) $Id: pager.h,v 1.92 2009/01/06 14:19:37 drh Exp $
    17     17   */
    18     18   
    19     19   #ifndef _PAGER_H_
    20     20   #define _PAGER_H_
    21     21   
    22     22   /*
    23     23   ** If defined as non-zero, auto-vacuum is enabled by default. Otherwise
................................................................................
    90     90   int sqlite3PagerPagecount(Pager*, int*);
    91     91   int sqlite3PagerTruncate(Pager*,Pgno);
    92     92   int sqlite3PagerBegin(DbPage*, int exFlag);
    93     93   int sqlite3PagerCommitPhaseOne(Pager*,const char *zMaster, int);
    94     94   int sqlite3PagerCommitPhaseTwo(Pager*);
    95     95   int sqlite3PagerRollback(Pager*);
    96     96   u8 sqlite3PagerIsreadonly(Pager*);
    97         -int sqlite3PagerStmtBegin(Pager*);
    98         -int sqlite3PagerStmtCommit(Pager*);
    99         -int sqlite3PagerStmtRollback(Pager*);
   100     97   void sqlite3PagerDontRollback(DbPage*);
   101     98   int sqlite3PagerDontWrite(DbPage*);
   102     99   int sqlite3PagerRefcount(Pager*);
   103    100   void sqlite3PagerSetSafetyLevel(Pager*,int,int);
   104    101   const char *sqlite3PagerFilename(Pager*);
   105    102   const sqlite3_vfs *sqlite3PagerVfs(Pager*);
   106    103   sqlite3_file *sqlite3PagerFile(Pager*);

Changes to src/where.c.

    12     12   ** This module contains C code that generates VDBE code used to process
    13     13   ** the WHERE clause of SQL statements.  This module is responsible for
    14     14   ** generating the code that loops through a table looking for applicable
    15     15   ** rows.  Indices are selected and used to speed the search when doing
    16     16   ** so is applicable.  Because this module is responsible for selecting
    17     17   ** indices, you might also think of this module as the "query optimizer".
    18     18   **
    19         -** $Id: where.c,v 1.356 2009/01/06 00:08:02 drh Exp $
           19  +** $Id: where.c,v 1.357 2009/01/06 14:19:37 drh Exp $
    20     20   */
    21     21   #include "sqliteInt.h"
    22     22   
    23     23   /*
    24     24   ** Trace output macros
    25     25   */
    26     26   #if defined(SQLITE_TEST) || defined(SQLITE_DEBUG)
................................................................................
  1843   1843       if( pTerm->eOperator==WO_OR 
  1844   1844           && ((pTerm->prereqAll & ~maskSrc) & notReady)==0
  1845   1845           && (pTerm->u.pOrInfo->indexable & maskSrc)!=0 ){
  1846   1846         WhereClause *pOrWC = &pTerm->u.pOrInfo->wc;
  1847   1847         WhereTerm *pOrTerm;
  1848   1848         int j;
  1849   1849         double rTotal = 0;
  1850         -      double nRow = 0;
         1850  +      nRow = 0;
  1851   1851         for(j=0, pOrTerm=pOrWC->a; j<pOrWC->nTerm; j++, pOrTerm++){
  1852   1852           WhereCost sTermCost;
  1853   1853           WHERETRACE(("... Multi-index OR testing for term %d of %d....\n", j,i));
  1854   1854           if( pOrTerm->eOperator==WO_AND ){
  1855   1855             WhereClause *pAndWC = &pOrTerm->u.pAndInfo->wc;
  1856   1856             bestIndex(pParse, pAndWC, pSrc, notReady, 0, &sTermCost);
  1857   1857           }else if( pOrTerm->leftCursor==iCur ){
................................................................................
  1899   1899   
  1900   1900     /* Look at each index.
  1901   1901     */
  1902   1902     if( pSrc->pIndex ){
  1903   1903       pProbe = pSrc->pIndex;
  1904   1904     }
  1905   1905     for(; pProbe; pProbe=(pSrc->pIndex ? 0 : pProbe->pNext)){
  1906         -    int i;                       /* Loop counter */
  1907   1906       double inMultiplier = 1;
  1908   1907   
  1909   1908       WHERETRACE(("... index %s:\n", pProbe->zName));
  1910   1909   
  1911   1910       /* Count the number of columns in the index that are satisfied
  1912   1911       ** by x=EXPR constraints or x IN (...) constraints.
  1913   1912       */
................................................................................
  2678   2677       ** The bottom of the loop looks like this:
  2679   2678       **
  2680   2679       **        Goto       0, A
  2681   2680       **     B:
  2682   2681       */
  2683   2682       int regOrRowset;       /* Register holding the RowSet object */
  2684   2683       int regNextRowid;      /* Register holding next rowid */
  2685         -    WhereTerm *pTerm;      /* The complete OR-clause */
  2686   2684       WhereClause *pOrWc;    /* The OR-clause broken out into subterms */
  2687   2685       WhereTerm *pOrTerm;    /* A single subterm within the OR-clause */
  2688   2686       SrcList oneTab;        /* Shortened table list */
  2689   2687      
  2690   2688       pTerm = pLevel->plan.u.pTerm;
  2691   2689       assert( pTerm!=0 );
  2692   2690       assert( pTerm->eOperator==WO_OR );