/ Check-in [82320501]
Login

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

Overview
Comment:Add comments to the WHERE_DISTINCT_* macros. No changes to code.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 82320501904f65030622a67836ba30f412169056
User & Date: drh 2012-09-19 17:31:15
Context
2012-09-19
21:15
Tighter VDBE code for the WHERE_DISTINCT_ORDERED case of DISTINCT keyword handling. check-in: 94b48064 user: drh tags: trunk
17:31
Add comments to the WHERE_DISTINCT_* macros. No changes to code. check-in: 82320501 user: drh tags: trunk
00:35
Merge the covering-index-scan optimization into trunk. check-in: ddd5d789 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/sqliteInt.h.

  1981   1981   ** into the second half to give some continuity.
  1982   1982   */
  1983   1983   struct WhereInfo {
  1984   1984     Parse *pParse;       /* Parsing and code generating context */
  1985   1985     u16 wctrlFlags;      /* Flags originally passed to sqlite3WhereBegin() */
  1986   1986     u8 okOnePass;        /* Ok to use one-pass algorithm for UPDATE or DELETE */
  1987   1987     u8 untestedTerms;    /* Not all WHERE terms resolved by outer loop */
  1988         -  u8 eDistinct;
         1988  +  u8 eDistinct;                  /* One of the WHERE_DISTINCT_* values below */
  1989   1989     SrcList *pTabList;             /* List of tables in the join */
  1990   1990     int iTop;                      /* The very beginning of the WHERE loop */
  1991   1991     int iContinue;                 /* Jump here to continue with next record */
  1992   1992     int iBreak;                    /* Jump here to break out of the loop */
  1993   1993     int nLevel;                    /* Number of nested loop */
  1994   1994     struct WhereClause *pWC;       /* Decomposition of the WHERE clause */
  1995   1995     double savedNQueryLoop;        /* pParse->nQueryLoop outside the WHERE loop */
  1996   1996     double nRowOut;                /* Estimated number of output rows */
  1997   1997     WhereLevel a[1];               /* Information about each nest loop in WHERE */
  1998   1998   };
  1999   1999   
  2000         -#define WHERE_DISTINCT_UNIQUE 1
  2001         -#define WHERE_DISTINCT_ORDERED 2
         2000  +/* Allowed values for WhereInfo.eDistinct */
         2001  +#define WHERE_DISTINCT_NOT     0  /* May contain non-adjacent duplicates */
         2002  +#define WHERE_DISTINCT_UNIQUE  1  /* No duplicates */
         2003  +#define WHERE_DISTINCT_ORDERED 2  /* All duplicates are adjacent */
  2002   2004   
  2003   2005   /*
  2004   2006   ** A NameContext defines a context in which to resolve table and column
  2005   2007   ** names.  The context consists of a list of tables (the pSrcList) field and
  2006   2008   ** a list of named expression (pEList).  The named expression list may
  2007   2009   ** be NULL.  The pSrc corresponds to the FROM clause of a SELECT or
  2008   2010   ** to the table being operated on by INSERT, UPDATE, or DELETE.  The