/ Check-in [828958ff]
Login

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

Overview
Comment:Small performance and size optimization spotted while working on the shared-cache problem.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:828958ff77a5c239d55302f570077835c093e0fa
User & Date: drh 2016-01-07 17:09:43
Context
2016-01-07
17:19
Fix to cause BtShared.db to be set correctly on shared-cache connections in SQLITE_THREADSAFE=0 builds. Added assert()s to verify the correct setting of BtShared.db. check-in: 2d96aeba user: drh tags: trunk
17:09
Small performance and size optimization spotted while working on the shared-cache problem. check-in: 828958ff user: drh tags: trunk
02:06
Add the "sqlite3 -sourceid" command in the TCL interface. Use that command and others to output additional information about the test configuration at the conclusion of a TCL test. check-in: 4f80440b user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Show Whitespace Changes Patch

Changes to src/build.c.

    20     20   **     creating ID lists
    21     21   **     BEGIN TRANSACTION
    22     22   **     COMMIT
    23     23   **     ROLLBACK
    24     24   */
    25     25   #include "sqliteInt.h"
    26     26   
    27         -/*
    28         -** This routine is called when a new SQL statement is beginning to
    29         -** be parsed.  Initialize the pParse structure as needed.
    30         -*/
    31         -void sqlite3BeginParse(Parse *pParse, int explainFlag){
    32         -  pParse->explain = (u8)explainFlag;
    33         -  pParse->nVar = 0;
    34         -}
    35         -
    36     27   #ifndef SQLITE_OMIT_SHARED_CACHE
    37     28   /*
    38     29   ** The TableLock structure is only used by the sqlite3TableLock() and
    39     30   ** codeTableLocks() functions.
    40     31   */
    41     32   struct TableLock {
    42     33     int iDb;             /* The database containing the table to be locked */

Changes to src/parse.y.

   110    110   
   111    111   // Input is a single SQL command
   112    112   input ::= cmdlist.
   113    113   cmdlist ::= cmdlist ecmd.
   114    114   cmdlist ::= ecmd.
   115    115   ecmd ::= SEMI.
   116    116   ecmd ::= explain cmdx SEMI.
   117         -explain ::= .           { sqlite3BeginParse(pParse, 0); }
          117  +explain ::= .
   118    118   %ifndef SQLITE_OMIT_EXPLAIN
   119         -explain ::= EXPLAIN.              { sqlite3BeginParse(pParse, 1); }
   120         -explain ::= EXPLAIN QUERY PLAN.   { sqlite3BeginParse(pParse, 2); }
          119  +explain ::= EXPLAIN.              { pParse->explain = 1; }
          120  +explain ::= EXPLAIN QUERY PLAN.   { pParse->explain = 2; }
   121    121   %endif  SQLITE_OMIT_EXPLAIN
   122    122   cmdx ::= cmd.           { sqlite3FinishCoding(pParse); }
   123    123   
   124    124   ///////////////////// Begin and end transactions. ////////////////////////////
   125    125   //
   126    126   
   127    127   cmd ::= BEGIN transtype(Y) trans_opt.  {sqlite3BeginTransaction(pParse, Y);}

Changes to src/sqliteInt.h.

  3336   3336   u32 sqlite3ExprListFlags(const ExprList*);
  3337   3337   int sqlite3Init(sqlite3*, char**);
  3338   3338   int sqlite3InitCallback(void*, int, char**, char**);
  3339   3339   void sqlite3Pragma(Parse*,Token*,Token*,Token*,int);
  3340   3340   void sqlite3ResetAllSchemasOfConnection(sqlite3*);
  3341   3341   void sqlite3ResetOneSchema(sqlite3*,int);
  3342   3342   void sqlite3CollapseDatabaseArray(sqlite3*);
  3343         -void sqlite3BeginParse(Parse*,int);
  3344   3343   void sqlite3CommitInternalChanges(sqlite3*);
  3345   3344   void sqlite3DeleteColumnNames(sqlite3*,Table*);
  3346   3345   int sqlite3ColumnsFromExprList(Parse*,ExprList*,i16*,Column**);
  3347   3346   Table *sqlite3ResultSetOfSelect(Parse*,Select*);
  3348   3347   void sqlite3OpenMasterTable(Parse *, int);
  3349   3348   Index *sqlite3PrimaryKeyIndex(Table*);
  3350   3349   i16 sqlite3ColumnOfIndex(Index*, i16);