/ Check-in [cdf00248]
Login

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

Overview
Comment:A couple of bug fixes.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | omit-rowid
Files: files | file ages | folders
SHA1: cdf00248cf8f7e3c2a3f2f5514273fbacc6fc8d9
User & Date: drh 2013-11-01 01:45:46
Context
2013-11-01
12:42
Some UPDATE statements now working in WITHOUT ROWID tables. check-in: 5c0eaea6 user: drh tags: omit-rowid
01:45
A couple of bug fixes. check-in: cdf00248 user: drh tags: omit-rowid
2013-10-31
20:34
Fix the Synopsis on OP_Concat. Added test_addop_breakpoint() during SQLITE_DEBUG. Enhanced sqlite3VdbeChangeToNoop() to omit the instruction if it is the most recent added. Continue to fix problems with UPDATE and WITHOUT ROWID. check-in: 9b6d9e10 user: drh tags: omit-rowid
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/build.c.

   963    963       */
   964    964   #if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE)
   965    965       if( isView || isVirtual ){
   966    966         sqlite3VdbeAddOp2(v, OP_Integer, 0, reg2);
   967    967       }else
   968    968   #endif
   969    969       {
   970         -      assert( sqlite3VdbeCurrentAddr(v) < 100 );
   971    970         pParse->addrCrTab = (u16)sqlite3VdbeAddOp2(v, OP_CreateTable, iDb, reg2);
   972    971       }
   973    972       sqlite3OpenMasterTable(pParse, iDb);
   974    973       sqlite3VdbeAddOp2(v, OP_NewRowid, 0, reg1);
   975    974       sqlite3VdbeAddOp2(v, OP_Null, 0, reg3);
   976    975       sqlite3VdbeAddOp3(v, OP_Insert, 0, reg3, reg1);
   977    976       sqlite3VdbeChangeP5(v, OPFLAG_APPEND);

Changes to src/prepare.c.

   112    112         ** has the same name as another index on a permanent index.  Since
   113    113         ** the permanent table is hidden by the TEMP table, we can also
   114    114         ** safely ignore the index on the permanent table.
   115    115         */
   116    116         /* Do Nothing */;
   117    117       }else if( sqlite3GetInt32(argv[1], &pIndex->tnum)==0 ){
   118    118         corruptSchema(pData, argv[0], "invalid rootpage");
   119         -    }
   120         -    if( pIndex->autoIndex==2 
          119  +    }else if( pIndex->autoIndex==2 
   121    120        && (pIndex->pTable->tabFlags & TF_WithoutRowid)!=0
   122    121       ){
   123    122         pIndex->pTable->tnum = pIndex->tnum;
   124    123       }
   125    124     }
   126    125     return 0;
   127    126   }

Changes to src/sqliteInt.h.

  2291   2291     u8 disableTriggers;  /* True to disable triggers */
  2292   2292   
  2293   2293     /* Above is constant between recursions.  Below is reset before and after
  2294   2294     ** each recursion */
  2295   2295   
  2296   2296     int nVar;                 /* Number of '?' variables seen in the SQL so far */
  2297   2297     int nzVar;                /* Number of available slots in azVar[] */
  2298         -  u8 addrCrTab;             /* Address of OP_CreateTable opcode */
         2298  +  int addrCrTab;            /* Address of OP_CreateTable opcode */
  2299   2299     u8 iPkSortOrder;          /* ASC or DESC for INTEGER PRIMARY KEY */
  2300   2300     u8 explain;               /* True if the EXPLAIN flag is found on the query */
  2301   2301   #ifndef SQLITE_OMIT_VIRTUALTABLE
  2302   2302     u8 declareVtab;           /* True if inside sqlite3_declare_vtab() */
  2303   2303     int nVtabLock;            /* Number of virtual tables to lock */
  2304   2304   #endif
  2305   2305     int nAlias;               /* Number of aliased result set columns */