-C Fix\sa\sproblem\swith\squeries\scontaining\sa\smin()\sor\smax()\sfunction\sfor\swhich\sthe\sFILTER\sclause\sexcludes\sall\srows.
-D 2019-09-20T20:52:16.031
+C Simplify\sthe\sfix\sin\sthe\sprevious\scommit.
+D 2019-09-20T21:12:40.662
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
F src/resolve.c 9891cf5fd155bb199f8b1ff5d1429b9f70484487f4c455bba94348d4cb6f829f
F src/rowset.c d977b011993aaea002cab3e0bb2ce50cf346000dff94e944d547b989f4b1fe93
-F src/select.c fd3ef107dfa6cdad83b76abc04c48411ba6103624f19a867954232ec7fb5edc7
+F src/select.c 446a2bdd217ef6a4e4af134ba2e92bedebc9d0b9cb199f7c2235bc986b544a03
F src/shell.c.in 68698630c21c5489fb3dc961a3ab3840e726c3c01e475dab96055788a7b6e5e6
F src/sqlite.h.in 5725a6b20190a1e8d662077a1c1c8ea889ad7be90dd803f914c2de226f5fe6ab
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 601ce9532d34f97a5faa170b6d8a272e5c54f2eabff84660201a1840e0fd9929
-R 3f32110f8bafe29b4265ff0c8cd184cc
+P b1d7e104e034655fe41bc55c562d91e8074a2973d538b8b29301458db45afc57
+R 6590f6fec6e23fb5ea7f662e774ed7b7
U dan
-Z 38f3480169c6f6b8dfb01762d9e1b1b0
+Z ff79fbaa280a5e99ef8f013f25fe3a2b
-b1d7e104e034655fe41bc55c562d91e8074a2973d538b8b29301458db45afc57
\ No newline at end of file
+5ef64b0f55d952c7b0016055eaf6bbc1b5b7afc09a62ee8e5e694ffa9863ac7c
\ No newline at end of file
int i;
int regHit = 0;
int addrHitTest = 0;
- int bFilterMinMax = 0;
struct AggInfo_func *pF;
struct AggInfo_col *pC;
if( pAggInfo->nAccumulator
&& (pF->pFunc->funcFlags & SQLITE_FUNC_NEEDCOLL)
){
- bFilterMinMax = 1;
if( regHit==0 ) regHit = ++pParse->nMem;
/* If this is the first row of the group (regAcc==0), clear the
** "magnet" register regHit so that the accumulator registers
- ** are populated even if the FILTER clause causes control to
- ** skip over the invocation of min() or max() altogether */
+ ** are populated if the FILTER clause jumps over the the
+ ** invocation of min() or max() altogether. Or, if this is not
+ ** the first row (regAcc==1), set the magnet register so that the
+ ** accumulators are not populated unless the min()/max() is invoked and
+ ** indicates that they should be. */
sqlite3VdbeAddOp2(v, OP_Copy, regAcc, regHit);
}
addrNext = sqlite3VdbeMakeLabel(pParse);
for(i=0, pC=pAggInfo->aCol; i<pAggInfo->nAccumulator; i++, pC++){
sqlite3ExprCode(pParse, pC->pExpr, pC->iMem);
}
- if( bFilterMinMax ){
- /* If there is a min() or max() with a FILTER clause, then ensure that
- ** the "magnet" register is set to indicate "do not attract" after
- ** loading column values into the accumulator registers */
- sqlite3VdbeAddOp2(v, OP_Integer, 1, regHit);
- }
pAggInfo->directMode = 0;
if( addrHitTest ){