Lines Matching defs:max

16170 #define OP_MemMax        159 /* synopsis: r[P1]=max(r[P1],r[P2])           */
16171 #define OP_OffsetLimit 160 /* synopsis: if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1) */
17261 #define SQLITE_MinMaxOpt 0x00010000 /* The min/max optimization */
17299 ** structure. For global built-in functions (ex: substr(), max(), count())
17370 #define SQLITE_FUNC_MINMAX 0x1000 /* True for min() and max() aggregates */
17382 #define SQLITE_FUNC_ANYORDER 0x08000000 /* count/min/max aggregate */
18677 #define WHERE_ORDERBY_MAX 0x0002 /* ORDER BY processing for max() func */
18760 #define NC_MinMaxAgg 0x001000 /* min/max aggregates seen. See note above */
18768 #define NC_OrderAgg 0x8000000 /* Has an aggregate other than count/min/max */
18868 #define SF_MinMaxAgg 0x0001000 /* Aggregate containing min() or max() */
19488 int mnReq, mxReq; /* Min and max heap requests sizes */
19520 sqlite3_int64 mxMemdbSize; /* Default max memdb size */
19735 int csrApp; /* Function cursor (used by min/max) */
19736 int regApp; /* Function register (also used by min/max) */
23615 ** spec into a max size: a b c d e f */
23625 u16 max;
23628 max = aMx[zFormat[2] - 'a'];
23638 if( val<(int)min || val>(int)max || (nextC!=0 && nextC!=*zDate) ){
34086 /* copy max significant digits to significand */
35761 /* 159 */ "MemMax" OpHelp("r[P1]=max(r[P1],r[P2])"),
35762 /* 160 */ "OffsetLimit" OpHelp("if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1)"),
41053 /* full bitset of atomics from max sector size and smaller */
41061 /* full bitset of atomics from max sector size and smaller */
52296 /* Max iDivisor is max(u32) / BITVEC_NPTR + 1. */
67656 ** The max embedded payload fraction is the amount of the total usable
67660 ** on one page. Thus the default max embedded payload fraction is 64.
67662 ** If the payload for a cell is larger than the max payload, then extra
78605 /* Set the new 'max-root-page' value in the database header. This
79387 "max rootpage (%d) disagrees with header (%d)",
79393 "incremental_vacuum enabled with a max rootpage of zero"
92189 ** be returned. This is used by the built-in min(), max() and nullif()
92193 ** max() aggregate will set to 1 if the current row is not the minimum or
97668 ** Synopsis: r[P1]=max(r[P1],r[P2])
97719 ** Synopsis: if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1)
101094 i64 max = SQLITE_MAX_MMAP_SIZE;
101095 sqlite3OsFileControlHint(*ppFd, SQLITE_FCNTL_MMAP_SIZE, (void*)&max);
116671 zErrDyn = sqlite3MPrintf(db, "too many attached databases - max %d",
122246 sqlite3ErrorMsg(pParse, "too many FROM clause terms, max: %d",
124763 ** Implementation of the non-aggregate min() and max() functions
124771 int mask; /* 0 for min() or 0xffffffff for max() */
126404 ** Routines to implement min() and max() aggregate functions.
126421 int max;
126424 /* This step function is used for both the min() and max() aggregates,
126426 ** comparison is inverted. For the max() aggregate, the
126429 ** Therefore the next statement sets variable 'max' to 1 for the max()
126432 max = sqlite3_user_data(context)!=0;
126434 if( (max && cmp<0) || (!max && cmp>0) ){
126994 FUNCTION(max, -1, 1, 1, minmaxFunc ),
126995 FUNCTION(max, 0, 1, 1, 0 ),
126996 WAGGREGATE(max, 1, 1, 1, minmaxStep, minMaxFinalize, minMaxValue, 0,
128999 ** (4) The original value of the max ROWID in pTab, or NULL if none
129044 pToplevel->nMem +=2; /* Rowid in sqlite_sequence + orig max val */
129059 int memId; /* Register holding max rowid */
142446 ** or max() functions. (Without this restriction, a query like:
142447 ** "SELECT x FROM (SELECT max(y), x FROM t1)" would not necessarily
143390 ** if the query is a candidate for the min/max optimization.
143392 ** If the query is a candidate for the min/max optimization, then set
143395 ** whether pFunc is a min() or max() function.
143397 ** If the query is not a candidate for the min/max optimization, return
143430 }else if( sqlite3StrICmp(zFunc, "max")==0 ){
144044 sqlite3ErrorMsg(pParse, "too many references to \"%s\": max 65535",
144529 ** If regAcc is non-zero and there are no min() or max() aggregates
144562 /* If regAcc==0, there there exists some min() or max() function
144569 ** invocation of min() or max() altogether. Or, if this is not
144571 ** the accumulators are not populated unless the min()/max() is invoked
144915 ExprList *pMinMaxOrderBy = 0; /* Added ORDER BY for min/max queries */
144916 u8 minMaxFlag; /* Flag for min/max queries */
145085 ** the built-in count(), min(), or max().
146027 /* If there are accumulator registers but no min() or max() functions
146032 ** there are no min() or max functions or (b) always updated for the
146034 ** least once even if the FILTER clause means the min() or max()
146062 /* If this query is a candidate for the min/max optimization, then
156525 sqlite3ErrorMsg(pParse, "too many arguments on %s() - max %d",
156659 ** While generating code for the min/max optimization, after handling
156660 ** the aggregate-step call to min() or max(), check to see if any
163156 ** SELECT a+1, max(b) OVER (PARTITION BY c ORDER BY d) FROM t1 ORDER BY e;
163160 ** SELECT a+1, max(b) OVER (PARTITION BY c ORDER BY d) FROM (
163166 ** (in this case max()) to process rows sorted in order of (c, d), which
163183 ** SELECT max(b) OVER (PARTITION BY c ORDER BY d),
163189 ** SELECT max(b) OVER (PARTITION BY c ORDER BY d),
163195 ** SELECT max(b) OVER (PARTITION BY c ORDER BY d) FROM (
163201 ** so that both min() and max() may process rows in the order defined by
163262 ** functions min() and max() are implemented using VDBE instructions if
163776 ** * If the OVER clause refered to a named window (as in "max(x) OVER win"),
164550 /* The inline versions of min() and max() require a single ephemeral
164553 ** regApp+0: slot to copy min()/max() argument to for MakeRecord
190189 /* 8 */ "SELECT (SELECT max(idx) FROM %Q.'%q_segdir' WHERE level = ?) + 1",
190191 /* 10 */ "SELECT coalesce((SELECT max(blockid) FROM %Q.'%q_segments') + 1, 1)",
190202 /* 15 */ "SELECT max(level) FROM %Q.'%q_segdir' WHERE level BETWEEN ? AND ?",
190267 /* 36 */ "SELECT max( level %% 1024 ) FROM %Q.'%q_segdir'",
191004 ** SELECT max(idx) FROM %_segdir WHERE level = :iLevel
192366 ** SELECT max(level) FROM %Q.'%q_segdir' WHERE level BETWEEN ? AND ?
192394 ** SELECT max(level) FROM %Q.'%q_segdir' WHERE level BETWEEN ? AND ?
210321 "SELECT max(_rowid_) FROM \"%s%w\"", zWrite, pIter->zTbl
225677 "too many prefix indexes (max %d)", FTS5_MAX_PREFIX_INDEXES
225689 *pzErr = sqlite3_mprintf("prefix length out of range (max 999)");
229762 ** + 3 bytes for a new column number (16-bit max) as a varint,
229763 ** + 5 bytes for the new position offset (32-bit max).