/ Check-in [663f04bd]
Login

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

Overview
Comment:Fix pragma code generation so that it always outputs an OP_Trace opcode so that pragmas are shown in sqlite3_trace() output.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 663f04bd48bc6f302230a22bd22b82bde2353943
User & Date: drh 2013-04-11 13:26:18
References
2013-04-11
18:04 New ticket [7ff3120e] Recovery race condition leads to database corruption on Windows. artifact: cc324cdb user: drh
Context
2013-04-11
18:28
Fix the xCheckReservedLock() method on the windows VFS so that it cannot return a false positive when two or more processes use it at the same time on the same file. Ticket [7ff3120e4fa54abb55] check-in: dd3510bb user: drh tags: trunk
13:26
Fix pragma code generation so that it always outputs an OP_Trace opcode so that pragmas are shown in sqlite3_trace() output. check-in: 663f04bd user: drh tags: trunk
11:53
Show the process-id on log messages from mptester. check-in: 6748a83d user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pragma.c.

   315    315     const char *zDb = 0;   /* The database name */
   316    316     Token *pId;            /* Pointer to <id> token */
   317    317     int iDb;               /* Database index for <database> */
   318    318     char *aFcntl[4];       /* Argument to SQLITE_FCNTL_PRAGMA */
   319    319     int rc;                      /* return value form SQLITE_FCNTL_PRAGMA */
   320    320     sqlite3 *db = pParse->db;    /* The database connection */
   321    321     Db *pDb;                     /* The specific database being pragmaed */
   322         -  Vdbe *v = pParse->pVdbe = sqlite3VdbeCreate(db);  /* Prepared statement */
          322  +  Vdbe *v = sqlite3GetVdbe(pParse);  /* Prepared statement */
   323    323   
   324    324     if( v==0 ) return;
   325    325     sqlite3VdbeRunOnlyOnce(v);
   326    326     pParse->nMem = 2;
   327    327   
   328    328     /* Interpret the [database.] part of the pragma statement. iDb is the
   329    329     ** index of the database this pragma is being applied to in db.aDb[]. */
................................................................................
   398    398     ** size.  But continue to take the absolute value of the default cache
   399    399     ** size of historical compatibility.
   400    400     */
   401    401     if( sqlite3StrICmp(zLeft,"default_cache_size")==0 ){
   402    402       static const VdbeOpList getCacheSize[] = {
   403    403         { OP_Transaction, 0, 0,        0},                         /* 0 */
   404    404         { OP_ReadCookie,  0, 1,        BTREE_DEFAULT_CACHE_SIZE},  /* 1 */
   405         -      { OP_IfPos,       1, 7,        0},
          405  +      { OP_IfPos,       1, 8,        0},
   406    406         { OP_Integer,     0, 2,        0},
   407    407         { OP_Subtract,    1, 2,        1},
   408         -      { OP_IfPos,       1, 7,        0},
          408  +      { OP_IfPos,       1, 8,        0},
   409    409         { OP_Integer,     0, 1,        0},                         /* 6 */
          410  +      { OP_Noop,        0, 0,        0},
   410    411         { OP_ResultRow,   1, 1,        0},
   411    412       };
   412    413       int addr;
   413    414       if( sqlite3ReadSchema(pParse) ) goto pragma_out;
   414    415       sqlite3VdbeUsesBtree(v, iDb);
   415    416       if( !zRight ){
   416    417         sqlite3VdbeSetNumCols(v, 1);