/ Check-in [5a2ac944]
Login

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

Overview
Comment:Reduce the size of the Index object (by 8 bytes on x64).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 5a2ac944839ec0c5b9147a035c6cbf0935f3d202
User & Date: drh 2013-01-01 14:01:28
Context
2013-01-03
18:07
Improvements to column name resolution in queries with parenthesized FROM clauses. Also includes a fix for ticket [beba9cae6345a3]. check-in: 99127a66 user: drh tags: trunk
2013-01-02
12:29
Merge all the latest trunk changes into the name-resolution enhancement branch. check-in: a5f4d2b6 user: drh tags: name-resolution-fix
2013-01-01
14:01
Reduce the size of the Index object (by 8 bytes on x64). check-in: 5a2ac944 user: drh tags: trunk
13:55
Enhance the table_info pragma so that the pk column shows the order of the columns in a multi-column primary key. check-in: 3076a890 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/sqliteInt.h.

  1480   1480   ** must be unique and what to do if they are not.  When Index.onError=OE_None,
  1481   1481   ** it means this is not a unique index.  Otherwise it is a unique index
  1482   1482   ** and the value of Index.onError indicate the which conflict resolution 
  1483   1483   ** algorithm to employ whenever an attempt is made to insert a non-unique
  1484   1484   ** element.
  1485   1485   */
  1486   1486   struct Index {
  1487         -  char *zName;     /* Name of this index */
  1488         -  int *aiColumn;   /* Which columns are used by this index.  1st is 0 */
  1489         -  tRowcnt *aiRowEst; /* Result of ANALYZE: Est. rows selected by each column */
  1490         -  Table *pTable;   /* The SQL table being indexed */
  1491         -  char *zColAff;   /* String defining the affinity of each column */
  1492         -  Index *pNext;    /* The next index associated with the same table */
  1493         -  Schema *pSchema; /* Schema containing this index */
  1494         -  u8 *aSortOrder;  /* Array of size Index.nColumn. True==DESC, False==ASC */
  1495         -  char **azColl;   /* Array of collation sequence names for index */
  1496         -  int nColumn;     /* Number of columns in the table used by this index */
  1497         -  int tnum;        /* Page containing root of this index in database file */
  1498         -  u8 onError;      /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */
  1499         -  u8 autoIndex;    /* True if is automatically created (ex: by UNIQUE) */
  1500         -  u8 bUnordered;   /* Use this index for == or IN queries only */
         1487  +  char *zName;             /* Name of this index */
         1488  +  int *aiColumn;           /* Which columns are used by this index.  1st is 0 */
         1489  +  tRowcnt *aiRowEst;       /* From ANALYZE: Est. rows selected by each column */
         1490  +  Table *pTable;           /* The SQL table being indexed */
         1491  +  char *zColAff;           /* String defining the affinity of each column */
         1492  +  Index *pNext;            /* The next index associated with the same table */
         1493  +  Schema *pSchema;         /* Schema containing this index */
         1494  +  u8 *aSortOrder;          /* for each column: True==DESC, False==ASC */
         1495  +  char **azColl;           /* Array of collation sequence names for index */
         1496  +  int tnum;                /* DB Page containing root of this index */
         1497  +  u16 nColumn;             /* Number of columns in table used by this index */
         1498  +  u8 onError;              /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */
         1499  +  unsigned autoIndex:2;    /* 1==UNIQUE, 2==PRIMARY KEY, 0==CREATE INDEX */
         1500  +  unsigned bUnordered:1;   /* Use this index for == or IN queries only */
  1501   1501   #ifdef SQLITE_ENABLE_STAT3
  1502   1502     int nSample;             /* Number of elements in aSample[] */
  1503   1503     tRowcnt avgEq;           /* Average nEq value for key values not in aSample */
  1504   1504     IndexSample *aSample;    /* Samples of the left-most key */
  1505   1505   #endif
  1506   1506   };
  1507   1507