/ Check-in [431556ca]
Login

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

Overview
Comment:Remove unused fields from the Parse object. Documentation and formatting improvements on data structure definitions.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:431556cac0b2c86d7f6a60412ff1023feeaafedf
User & Date: drh 2011-11-29 15:40:32
Context
2011-12-06
00:47
Merge the winGetLastError fixes into trunk. check-in: 5b03ba9d user: drh tags: trunk
2011-12-01
18:44
Add stdio-like I/O interfaces to the test_quota VFS. This is a prototype change for discussion and is mostly untested. This is an alternative to adding stdio-like I/O interfaces in the core. There is no guarantee that this code will make it into the trunk. If it does get to trunk, there could be many changes to the interface first. check-in: bd3ce723 user: drh tags: quota-stdio
02:32
Add a prototype implementation of stdio-like routines for accessing the VFS. This is intended as documentation. The code is untested. There is no guarantee that any of this will ever make it into trunk. Substantial revision is possible prior to reaching trunk, if it ever does. Closed-Leaf check-in: 8936542b user: drh tags: vfs-stdio
2011-11-29
15:40
Remove unused fields from the Parse object. Documentation and formatting improvements on data structure definitions. check-in: 431556ca user: drh tags: trunk
15:04
Remove unused boolean fields from the UnpackedRecord object. check-in: b10d091e user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Show Whitespace Changes Patch

Changes to src/delete.c.

   144    144     SrcList *pSelectSrc = NULL;  /* SELECT rowid FROM x ... (dup of pSrc) */
   145    145     Select *pSelect = NULL;      /* Complete SELECT tree */
   146    146   
   147    147     /* Check that there isn't an ORDER BY without a LIMIT clause.
   148    148     */
   149    149     if( pOrderBy && (pLimit == 0) ) {
   150    150       sqlite3ErrorMsg(pParse, "ORDER BY without LIMIT on %s", zStmtType);
   151         -    pParse->parseError = 1;
   152    151       goto limit_where_cleanup_2;
   153    152     }
   154    153   
   155    154     /* We only need to generate a select expression if there
   156    155     ** is a limit/offset term to enforce.
   157    156     */
   158    157     if( pLimit == 0 ) {

Changes to src/parse.y.

    29     29   
    30     30   // This code runs whenever there is a syntax error
    31     31   //
    32     32   %syntax_error {
    33     33     UNUSED_PARAMETER(yymajor);  /* Silence some compiler warnings */
    34     34     assert( TOKEN.z[0] );  /* The tokenizer always gives us a token */
    35     35     sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN);
    36         -  pParse->parseError = 1;
    37     36   }
    38     37   %stack_overflow {
    39     38     UNUSED_PARAMETER(yypMinor); /* Silence some compiler warnings */
    40     39     sqlite3ErrorMsg(pParse, "parser stack overflow");
    41         -  pParse->parseError = 1;
    42     40   }
    43     41   
    44     42   // The name of the generated procedure that implements the parser
    45     43   // is as follows:
    46     44   %name sqlite3Parser
    47     45   
    48     46   // The following text is included near the beginning of the C source

Changes to src/sqliteInt.h.

  2068   2068     double nSelectRow;     /* Estimated number of result rows */
  2069   2069   };
  2070   2070   
  2071   2071   /*
  2072   2072   ** Allowed values for Select.selFlags.  The "SF" prefix stands for
  2073   2073   ** "Select Flag".
  2074   2074   */
  2075         -#define SF_Distinct        0x0001  /* Output should be DISTINCT */
  2076         -#define SF_Resolved        0x0002  /* Identifiers have been resolved */
  2077         -#define SF_Aggregate       0x0004  /* Contains aggregate functions */
  2078         -#define SF_UsesEphemeral   0x0008  /* Uses the OpenEphemeral opcode */
  2079         -#define SF_Expanded        0x0010  /* sqlite3SelectExpand() called on this */
  2080         -#define SF_HasTypeInfo     0x0020  /* FROM subqueries have Table metadata */
  2081         -#define SF_UseSorter       0x0040  /* Sort using a sorter */
         2075  +#define SF_Distinct        0x01  /* Output should be DISTINCT */
         2076  +#define SF_Resolved        0x02  /* Identifiers have been resolved */
         2077  +#define SF_Aggregate       0x04  /* Contains aggregate functions */
         2078  +#define SF_UsesEphemeral   0x08  /* Uses the OpenEphemeral opcode */
         2079  +#define SF_Expanded        0x10  /* sqlite3SelectExpand() called on this */
         2080  +#define SF_HasTypeInfo     0x20  /* FROM subqueries have Table metadata */
         2081  +#define SF_UseSorter       0x40  /* Sort using a sorter */
  2082   2082   
  2083   2083   
  2084   2084   /*
  2085   2085   ** The results of a select can be distributed in several ways.  The
  2086   2086   ** "SRT" prefix means "SELECT Result Type".
  2087   2087   */
  2088   2088   #define SRT_Union        1  /* Store result as keys in an index */
................................................................................
  2189   2189   */
  2190   2190   struct Parse {
  2191   2191     sqlite3 *db;         /* The main database structure */
  2192   2192     int rc;              /* Return code from execution */
  2193   2193     char *zErrMsg;       /* An error message */
  2194   2194     Vdbe *pVdbe;         /* An engine for executing database bytecode */
  2195   2195     u8 colNamesSet;      /* TRUE after OP_ColumnName has been issued to pVdbe */
  2196         -  u8 nameClash;        /* A permanent table name clashes with temp table name */
  2197   2196     u8 checkSchema;      /* Causes schema cookie check after an error */
  2198   2197     u8 nested;           /* Number of nested calls to the parser/code generator */
  2199         -  u8 parseError;       /* True after a parsing error.  Ticket #1794 */
  2200   2198     u8 nTempReg;         /* Number of temporary registers in aTempReg[] */
  2201   2199     u8 nTempInUse;       /* Number of aTempReg[] currently checked out */
  2202   2200     int aTempReg[8];     /* Holding area for temporary registers */
  2203   2201     int nRangeReg;       /* Size of the temporary register block */
  2204   2202     int iRangeReg;       /* First register in temporary register block */
  2205   2203     int nErr;            /* Number of errors seen */
  2206   2204     int nTab;            /* Number of previously allocated VDBE cursors */
  2207   2205     int nMem;            /* Number of memory cells used so far */
  2208   2206     int nSet;            /* Number of sets used so far */
  2209   2207     int ckBase;          /* Base register of data during check constraints */
  2210   2208     int iCacheLevel;     /* ColCache valid when aColCache[].iLevel<=iCacheLevel */
  2211   2209     int iCacheCnt;       /* Counter used to generate aColCache[].lru values */
  2212         -  u8 nColCache;        /* Number of entries in the column cache */
  2213         -  u8 iColCache;        /* Next entry of the cache to replace */
         2210  +  u8 nColCache;        /* Number of entries in aColCache[] */
         2211  +  u8 iColCache;        /* Next entry in aColCache[] to replace */
  2214   2212     struct yColCache {
  2215   2213       int iTable;           /* Table cursor number */
  2216   2214       int iColumn;          /* Table column number */
  2217   2215       u8 tempReg;           /* iReg is a temp register that needs to be freed */
  2218   2216       int iLevel;           /* Nesting level */
  2219   2217       int iReg;             /* Reg with value of this column. 0 means none. */
  2220   2218       int lru;              /* Least recently used entry has the smallest value */
................................................................................
  2248   2246     ** each recursion */
  2249   2247   
  2250   2248     int nVar;            /* Number of '?' variables seen in the SQL so far */
  2251   2249     int nzVar;           /* Number of available slots in azVar[] */
  2252   2250     char **azVar;        /* Pointers to names of parameters */
  2253   2251     Vdbe *pReprepare;    /* VM being reprepared (sqlite3Reprepare()) */
  2254   2252     int nAlias;          /* Number of aliased result set columns */
  2255         -  int nAliasAlloc;     /* Number of allocated slots for aAlias[] */
  2256   2253     int *aAlias;         /* Register used to hold aliased result */
  2257   2254     u8 explain;          /* True if the EXPLAIN flag is found on the query */
  2258   2255     Token sNameToken;    /* Token with unqualified schema object name */
  2259   2256     Token sLastToken;    /* The last token parsed */
  2260   2257     const char *zTail;   /* All SQL text past the last semicolon parsed */
  2261   2258     Table *pNewTable;    /* A table being constructed by CREATE TABLE */
  2262   2259     Trigger *pNewTrigger;     /* Trigger under construct by a CREATE TRIGGER */