diff options
author | drh <drh@noemail.net> | 2014-05-29 20:29:13 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2014-05-29 20:29:13 +0000 |
commit | cbabb203908dc97166f2c5fe9366e134fdaf1ed2 (patch) | |
tree | 5cc34fc60adfff789aa59dc771b02e9440c0ec1e /src/sqliteInt.h | |
parent | aff0fbb6a51b2ad8a5e1d7787236226603380437 (diff) | |
parent | b463fef3fda4d233ba634d81bfc9c3bf001f0513 (diff) | |
download | sqlite-cbabb203908dc97166f2c5fe9366e134fdaf1ed2.tar.gz sqlite-cbabb203908dc97166f2c5fe9366e134fdaf1ed2.zip |
Merge trunk changes into the sessions branch.
FossilOrigin-Name: 9f18e78f039ffa89a8806810ad385bdc51bc88ed
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r-- | src/sqliteInt.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 9b4215dd8..061c9e2bc 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -1702,7 +1702,7 @@ struct Index { u16 nKeyCol; /* Number of columns forming the key */ u16 nColumn; /* Number of columns stored in the index */ u8 onError; /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */ - unsigned autoIndex:2; /* 1==UNIQUE, 2==PRIMARY KEY, 0==CREATE INDEX */ + unsigned idxType:2; /* 1==UNIQUE, 2==PRIMARY KEY, 0==CREATE INDEX */ unsigned bUnordered:1; /* Use this index for == or IN queries only */ unsigned uniqNotNull:1; /* True if UNIQUE and NOT NULL for all columns */ unsigned isResized:1; /* True if resizeIndexObject() has been called */ @@ -1716,6 +1716,16 @@ struct Index { }; /* +** Allowed values for Index.idxType +*/ +#define SQLITE_IDXTYPE_APPDEF 0 /* Created using CREATE INDEX */ +#define SQLITE_IDXTYPE_UNIQUE 1 /* Implements a UNIQUE constraint */ +#define SQLITE_IDXTYPE_PRIMARYKEY 2 /* Is the PRIMARY KEY for the table */ + +/* Return true if index X is a PRIMARY KEY index */ +#define IsPrimaryKeyIndex(X) ((X)->idxType==SQLITE_IDXTYPE_PRIMARYKEY) + +/* ** Each sample stored in the sqlite_stat3 table is represented in memory ** using a structure of this type. See documentation at the top of the ** analyze.c source file for additional information. |