/ Check-in [a06235e0]
Login

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

Overview
Comment:Remove an unused #define and add an assert(), both associated with WITH logic.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a06235e0f6aa1e8fefa3f2873ee035eac9dac750
User & Date: drh 2014-01-20 14:58:55
Context
2014-01-20
18:25
Handle a few obscure problems that could manifest if a database corrupted in a certain way was written by a connection in the middle of a SELECT statement on the same db. check-in: eba8a564 user: dan tags: trunk
14:58
Remove an unused #define and add an assert(), both associated with WITH logic. check-in: a06235e0 user: drh tags: trunk
14:17
Do not run the tests in with2.test with SQLITE_OMIT_CTE builds. check-in: 8a973912 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/select.c.

  3591   3591       ** early. If pCte->zErr is NULL, then this is not a recursive reference.
  3592   3592       ** In this case, proceed.  */
  3593   3593       if( pCte->zErr ){
  3594   3594         sqlite3ErrorMsg(pParse, pCte->zErr, pCte->zName);
  3595   3595         return SQLITE_ERROR;
  3596   3596       }
  3597   3597   
         3598  +    assert( pFrom->pTab==0 );
  3598   3599       pFrom->pTab = pTab = sqlite3DbMallocZero(db, sizeof(Table));
  3599   3600       if( pTab==0 ) return WRC_Abort;
  3600   3601       pTab->nRef = 1;
  3601   3602       pTab->zName = sqlite3DbStrDup(db, pCte->zName);
  3602   3603       pTab->iPKey = -1;
  3603   3604       pTab->nRowEst = 1048576;
  3604   3605       pTab->tabFlags |= TF_Ephemeral;

Changes to src/sqliteInt.h.

  1433   1433   */
  1434   1434   #define TF_Readonly        0x01    /* Read-only system table */
  1435   1435   #define TF_Ephemeral       0x02    /* An ephemeral table */
  1436   1436   #define TF_HasPrimaryKey   0x04    /* Table has a primary key */
  1437   1437   #define TF_Autoincrement   0x08    /* Integer primary key is autoincrement */
  1438   1438   #define TF_Virtual         0x10    /* Is a virtual table */
  1439   1439   #define TF_WithoutRowid    0x20    /* No rowid used. PRIMARY KEY is the key */
  1440         -#define TF_Recursive       0x40    /* Recursive reference within CTE */
  1441   1440   
  1442   1441   
  1443   1442   /*
  1444   1443   ** Test to see whether or not a table is a virtual table.  This is
  1445   1444   ** done as a macro so that it will be optimized out when virtual
  1446   1445   ** table support is omitted from the build.
  1447   1446   */