mirror of https://github.com/sqlite/sqlite
Add the SF_HasAgg constant (currently unused). Also enhance the comments on
many other constant definitions to detail constraints on their values. FossilOrigin-Name: 7b7a69d098f7581a43b818c251717c2450b797de
This commit is contained in:
parent
fc26f7cfed
commit
497116007e
18
manifest
18
manifest
|
@ -1,5 +1,5 @@
|
|||
C Correctly\sinterpret\snegative\s"PRAGMA\scache_size"\svalues\swhen\sdetermining\sthe\scache-size\sused\sfor\ssorting\slarge\samounts\sof\sdata\s(i.e.\sthe\sfunctionality\sin\svdbesort.c).
|
||||
D 2016-04-14T15:44:37.886
|
||||
C Add\sthe\sSF_HasAgg\sconstant\s(currently\sunused).\s\sAlso\senhance\sthe\scomments\son\nmany\sother\sconstant\sdefinitions\sto\sdetail\sconstraints\son\stheir\svalues.
|
||||
D 2016-04-14T16:40:13.322
|
||||
F Makefile.in eba680121821b8a60940a81454316f47a341487a
|
||||
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
||||
F Makefile.msc 71b8b16cf9393f68e2e2035486ca104872558836
|
||||
|
@ -363,7 +363,7 @@ F src/os_unix.c bde4844f0849cab5924c6a81178f8500774ce76b
|
|||
F src/os_win.c b169437dff859e308b3726594094a2f8ca922941
|
||||
F src/os_win.h eb7a47aa17b26b77eb97e4823f20a00b8bda12ca
|
||||
F src/pager.c 38718a019ca762ba4f6795425d5a54db70d1790d
|
||||
F src/pager.h e1d38a2f14849e219df0f91f8323504d134c8a56
|
||||
F src/pager.h 329bdf078a4e0a3b35084534d58625d21fd03681
|
||||
F src/parse.y 10eb2f3fb62341291528c7984498054731f9d31e
|
||||
F src/pcache.c 647bb53a86b7bbcf55ad88089b3ea5a9170b90df
|
||||
F src/pcache.h 4d0ccaad264d360981ec5e6a2b596d6e85242545
|
||||
|
@ -380,7 +380,7 @@ F src/shell.c ebcdf99f3e7c7409bd463eae443f1bd01e3e2d02
|
|||
F src/sqlite.h.in 64eb70a3b309751bebf73a5552a51244f68f0ea5
|
||||
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
|
||||
F src/sqlite3ext.h 98f72cbfe00169c39089115427d06ea05fe4b4a2
|
||||
F src/sqliteInt.h b3744b29555b83054f315f62d61b3a6558fa9e1c
|
||||
F src/sqliteInt.h 49cd2b5cd07cca7c462608540cb6dfa8ab03ba89
|
||||
F src/sqliteLimit.h c0373387c287c8d0932510b5547ecde31b5da247
|
||||
F src/status.c 70912d7be68e9e2dbc4010c93d344af61d4c59ba
|
||||
F src/table.c 5226df15ab9179b9ed558d89575ea0ce37b03fc9
|
||||
|
@ -456,7 +456,7 @@ F src/wal.c 4db22ed7e77bcf672b1a685d6ddeffba8d5be302
|
|||
F src/wal.h 2f7c831cf3b071fa548bf2d5cac640846a7ff19c
|
||||
F src/walker.c 0f142b5bd3ed2041fc52d773880748b212e63354
|
||||
F src/where.c bae50f2f18f9e8584549a77363858623b07e4915
|
||||
F src/whereInt.h 43466b107862e348e5c2a709cc4812a611e27908
|
||||
F src/whereInt.h 7de94b751f088fe3fdc8cc04a491376f0900a059
|
||||
F src/wherecode.c 8fdad9fbba723df1c1e8d07e7ea8507572040340
|
||||
F src/whereexpr.c eacc0e60d029a082b4fc0cc42ea98544add1319e
|
||||
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
|
||||
|
@ -1482,7 +1482,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
|||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 67d7f79c5e5be41a18817c802b5c4d349e3a83a4
|
||||
R 7d2f177c9a481d6a3916beb1fe8bc290
|
||||
U dan
|
||||
Z 2305c008703672127d77c74ca18473e8
|
||||
P 79147dca87cfd7eb62d57baa3b70fa2a8542232a
|
||||
R 6419c618333708e1ee248e43219e551e
|
||||
U drh
|
||||
Z 76d9f185ebd1be8244746d28959cec5d
|
||||
|
|
|
@ -1 +1 @@
|
|||
79147dca87cfd7eb62d57baa3b70fa2a8542232a
|
||||
7b7a69d098f7581a43b818c251717c2450b797de
|
11
src/pager.h
11
src/pager.h
|
@ -68,7 +68,11 @@ typedef struct PgHdr DbPage;
|
|||
#define PAGER_LOCKINGMODE_EXCLUSIVE 1
|
||||
|
||||
/*
|
||||
** Numeric constants that encode the journalmode.
|
||||
** Numeric constants that encode the journalmode.
|
||||
**
|
||||
** The numeric values encoded here (other than PAGER_JOURNALMODE_QUERY)
|
||||
** are exposed in the API via the "PRAGMA journal_mode" command and
|
||||
** therefore cannot be changed without a compatibility break.
|
||||
*/
|
||||
#define PAGER_JOURNALMODE_QUERY (-1) /* Query the value of journalmode */
|
||||
#define PAGER_JOURNALMODE_DELETE 0 /* Commit by deleting journal file */
|
||||
|
@ -86,6 +90,11 @@ typedef struct PgHdr DbPage;
|
|||
|
||||
/*
|
||||
** Flags for sqlite3PagerSetFlags()
|
||||
**
|
||||
** Value constraints (enforced via assert()):
|
||||
** PAGER_FULLFSYNC == SQLITE_FullFSync
|
||||
** PAGER_CKPT_FULLFSYNC == SQLITE_CkptFullFSync
|
||||
** PAGER_CACHE_SPILL == SQLITE_CacheSpill
|
||||
*/
|
||||
#define PAGER_SYNCHRONOUS_OFF 0x01 /* PRAGMA synchronous=OFF */
|
||||
#define PAGER_SYNCHRONOUS_NORMAL 0x02 /* PRAGMA synchronous=NORMAL */
|
||||
|
|
|
@ -1350,6 +1350,11 @@ struct sqlite3 {
|
|||
|
||||
/*
|
||||
** Possible values for the sqlite3.flags.
|
||||
**
|
||||
** Value constraints (enforced via assert()):
|
||||
** SQLITE_FullFSync == PAGER_FULLFSYNC
|
||||
** SQLITE_CkptFullFSync == PAGER_CKPT_FULLFSYNC
|
||||
** SQLITE_CacheSpill == PAGER_CACHE_SPILL
|
||||
*/
|
||||
#define SQLITE_VdbeTrace 0x00000001 /* True to trace VDBE execution */
|
||||
#define SQLITE_InternChanges 0x00000002 /* Uncommitted Hash table changes */
|
||||
|
@ -1484,6 +1489,13 @@ struct FuncDestructor {
|
|||
** values must correspond to OPFLAG_LENGTHARG and OPFLAG_TYPEOFARG. And
|
||||
** SQLITE_FUNC_CONSTANT must be the same as SQLITE_DETERMINISTIC. There
|
||||
** are assert() statements in the code to verify this.
|
||||
**
|
||||
** Value constraints (enforced via assert()):
|
||||
** SQLITE_FUNC_MINMAX == NC_MinMaxAgg == SF_MinMaxAgg
|
||||
** SQLITE_FUNC_LENGTH == OPFLAG_LENGTHARG
|
||||
** SQLITE_FUNC_TYPEOF == OPFLAG_TYPEOFARG
|
||||
** SQLITE_FUNC_CONSTANT == SQLITE_DETERMINISTIC from the API
|
||||
** SQLITE_FUNC_ENCMASK depends on SQLITE_UTF* macros in the API
|
||||
*/
|
||||
#define SQLITE_FUNC_ENCMASK 0x0003 /* SQLITE_UTF8, SQLITE_UTF16BE or UTF16LE */
|
||||
#define SQLITE_FUNC_LIKE 0x0004 /* Candidate for the LIKE optimization */
|
||||
|
@ -2483,6 +2495,9 @@ struct SrcList {
|
|||
/*
|
||||
** Flags appropriate for the wctrlFlags parameter of sqlite3WhereBegin()
|
||||
** and the WhereInfo.wctrlFlags member.
|
||||
**
|
||||
** Value constraints (enforced via assert()):
|
||||
** WHERE_USE_LIMIT == SF_FixedLimit
|
||||
*/
|
||||
#define WHERE_ORDERBY_NORMAL 0x0000 /* No-op */
|
||||
#define WHERE_ORDERBY_MIN 0x0001 /* ORDER BY processing for min() func */
|
||||
|
@ -2543,15 +2558,16 @@ struct NameContext {
|
|||
/*
|
||||
** Allowed values for the NameContext, ncFlags field.
|
||||
**
|
||||
** Note: NC_MinMaxAgg must have the same value as SF_MinMaxAgg and
|
||||
** SQLITE_FUNC_MINMAX.
|
||||
** Value constraints (all checked via assert()):
|
||||
** NC_HasAgg == SF_HasAgg
|
||||
** NC_MinMaxAgg == SF_MinMaxAgg == SQLITE_FUNC_MINMAX
|
||||
**
|
||||
*/
|
||||
#define NC_AllowAgg 0x0001 /* Aggregate functions are allowed here */
|
||||
#define NC_HasAgg 0x0002 /* One or more aggregate functions seen */
|
||||
#define NC_PartIdx 0x0002 /* True if resolving a partial index WHERE */
|
||||
#define NC_IsCheck 0x0004 /* True if resolving names in a CHECK constraint */
|
||||
#define NC_InAggFunc 0x0008 /* True if analyzing arguments to an agg func */
|
||||
#define NC_PartIdx 0x0010 /* True if resolving a partial index WHERE */
|
||||
#define NC_HasAgg 0x0010 /* One or more aggregate functions seen */
|
||||
#define NC_IdxExpr 0x0020 /* True if resolving columns of CREATE INDEX */
|
||||
#define NC_MinMaxAgg 0x1000 /* min/max aggregates seen. See note above */
|
||||
|
||||
|
@ -2600,24 +2616,30 @@ struct Select {
|
|||
/*
|
||||
** Allowed values for Select.selFlags. The "SF" prefix stands for
|
||||
** "Select Flag".
|
||||
**
|
||||
** Value constraints (all checked via assert())
|
||||
** SF_HasAgg == NC_HasAgg
|
||||
** SF_MinMaxAgg == NC_MinMaxAgg == SQLITE_FUNC_MINMAX
|
||||
** SF_FixedLimit == WHERE_USE_LIMIT
|
||||
*/
|
||||
#define SF_Distinct 0x00001 /* Output should be DISTINCT */
|
||||
#define SF_All 0x00002 /* Includes the ALL keyword */
|
||||
#define SF_Resolved 0x00004 /* Identifiers have been resolved */
|
||||
#define SF_Aggregate 0x00008 /* Contains aggregate functions */
|
||||
#define SF_UsesEphemeral 0x00010 /* Uses the OpenEphemeral opcode */
|
||||
#define SF_Expanded 0x00020 /* sqlite3SelectExpand() called on this */
|
||||
#define SF_HasTypeInfo 0x00040 /* FROM subqueries have Table metadata */
|
||||
#define SF_Compound 0x00080 /* Part of a compound query */
|
||||
#define SF_Values 0x00100 /* Synthesized from VALUES clause */
|
||||
#define SF_MultiValue 0x00200 /* Single VALUES term with multiple rows */
|
||||
#define SF_NestedFrom 0x00400 /* Part of a parenthesized FROM clause */
|
||||
#define SF_MaybeConvert 0x00800 /* Need convertCompoundSelectToSubquery() */
|
||||
#define SF_Aggregate 0x00008 /* Contains agg functions or a GROUP BY */
|
||||
#define SF_HasAgg 0x00010 /* Contains aggregate functions */
|
||||
#define SF_UsesEphemeral 0x00020 /* Uses the OpenEphemeral opcode */
|
||||
#define SF_Expanded 0x00040 /* sqlite3SelectExpand() called on this */
|
||||
#define SF_HasTypeInfo 0x00080 /* FROM subqueries have Table metadata */
|
||||
#define SF_Compound 0x00100 /* Part of a compound query */
|
||||
#define SF_Values 0x00200 /* Synthesized from VALUES clause */
|
||||
#define SF_MultiValue 0x00400 /* Single VALUES term with multiple rows */
|
||||
#define SF_NestedFrom 0x00800 /* Part of a parenthesized FROM clause */
|
||||
#define SF_MinMaxAgg 0x01000 /* Aggregate containing min() or max() */
|
||||
#define SF_Recursive 0x02000 /* The recursive part of a recursive CTE */
|
||||
#define SF_FixedLimit 0x04000 /* nSelectRow set by a constant LIMIT */
|
||||
#define SF_Converted 0x08000 /* By convertCompoundSelectToSubquery() */
|
||||
#define SF_IncludeHidden 0x10000 /* Include hidden columns in output */
|
||||
#define SF_MaybeConvert 0x08000 /* Need convertCompoundSelectToSubquery() */
|
||||
#define SF_Converted 0x10000 /* By convertCompoundSelectToSubquery() */
|
||||
#define SF_IncludeHidden 0x20000 /* Include hidden columns in output */
|
||||
|
||||
|
||||
/*
|
||||
|
@ -2928,6 +2950,15 @@ struct AuthContext {
|
|||
|
||||
/*
|
||||
** Bitfield flags for P5 value in various opcodes.
|
||||
**
|
||||
** Value constraints (enforced via assert()):
|
||||
** OPFLAG_LENGTHARG == SQLITE_FUNC_LENGTH
|
||||
** OPFLAG_TYPEOFARG == SQLITE_FUNC_TYPEOF
|
||||
** OPFLAG_BULKCSR == BTREE_BULKLOAD
|
||||
** OPFLAG_SEEKEQ == BTREE_SEEK_EQ
|
||||
** OPFLAG_FORDELETE == BTREE_FORDELETE
|
||||
** OPFLAG_SAVEPOSITION == BTREE_SAVEPOSITION
|
||||
** OPFLAG_AUXDELETE == BTREE_AUXDELETE
|
||||
*/
|
||||
#define OPFLAG_NCHANGE 0x01 /* OP_Insert: Set to update db->nChange */
|
||||
/* Also used in P2 (not P5) of OP_Delete */
|
||||
|
|
|
@ -492,6 +492,14 @@ void sqlite3WhereTabFuncArgs(Parse*, struct SrcList_item*, WhereClause*);
|
|||
** operators that are of interest to the query planner. An
|
||||
** OR-ed combination of these values can be used when searching for
|
||||
** particular WhereTerms within a WhereClause.
|
||||
**
|
||||
** Value constraints:
|
||||
** WO_EQ == SQLITE_INDEX_CONSTRAINT_EQ
|
||||
** WO_LT == SQLITE_INDEX_CONSTRAINT_LT
|
||||
** WO_LE == SQLITE_INDEX_CONSTRAINT_LE
|
||||
** WO_GT == SQLITE_INDEX_CONSTRAINT_GT
|
||||
** WO_GE == SQLITE_INDEX_CONSTRAINT_GE
|
||||
** WO_MATCH == SQLITE_INDEX_CONSTRAINT_MATCH
|
||||
*/
|
||||
#define WO_IN 0x0001
|
||||
#define WO_EQ 0x0002
|
||||
|
|
Loading…
Reference in New Issue