Remove incorrect ALWAYS() macros from the window function logic.
FossilOrigin-Name: 94ac51cc4e7fdf484214e1936fc96104b96134632a8eb99558b3af743ac8bb8b
This commit is contained in:
parent
c3649417fe
commit
5d6374fa39
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
||||
C Add\sVdbeModuleComment()s\son\sthe\sthree\smain\scode\sgenerators\sfor\swindow\nfunctions.
|
||||
D 2018-07-10T22:24:14.549
|
||||
C Remove\sincorrect\sALWAYS()\smacros\sfrom\sthe\swindow\sfunction\slogic.
|
||||
D 2018-07-10T23:31:17.172
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F Makefile.in 0a3a6c81e6fcb969ff9106e882f0a08547014ba463cb6beca4c4efaecc924ee6
|
||||
@ -584,7 +584,7 @@ F src/where.c 7afd00cf7fb57a2770e7ab35deae105dc5b70b414c5018543850da999bfec8d6
|
||||
F src/whereInt.h b90ef9b9707ef750eab2a7a080c48fb4900315033274689def32d0cf5a81ebe4
|
||||
F src/wherecode.c fe23a55294b4c94bf658d2a6eb7996170dd563bf33af4c3e5d71aff3483e4b08
|
||||
F src/whereexpr.c 571618c67a3eb5ce0f1158c2792c1aee9b4a4a264392fc4fb1b35467f80abf9a
|
||||
F src/window.c f0ff13192d38f9f182c30d47f8a2dffccdacccc442c988e364d31cfa27a45122
|
||||
F src/window.c 59a256d21707067759f3e3e4014e57b916bc296f4a1f3ae09c2e27ff1ea3b39f
|
||||
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
|
||||
F test/affinity2.test a6d901b436328bd67a79b41bb0ac2663918fe3bd
|
||||
F test/affinity3.test 6a101af2fc945ce2912f6fe54dd646018551710d
|
||||
@ -1746,7 +1746,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 f2057542cf6860badb4ae6b1a0df94a78d5b2661dabf16f5705b3f8236521bea
|
||||
R 647957a7a9f19e01284084867c547bba
|
||||
P f7c239e959004cb90dc8537ab2e1fca5f26ef21f4f6f3dfd743a05a55e705090
|
||||
R 4ee8e8b0cdbc1d8a8525b858e569a01e
|
||||
U drh
|
||||
Z 1dad2193c988f774f424a6011e48f04c
|
||||
Z cc333ee9ff40d8ebbc1003ae2a9f5622
|
||||
|
@ -1 +1 @@
|
||||
f7c239e959004cb90dc8537ab2e1fca5f26ef21f4f6f3dfd743a05a55e705090
|
||||
94ac51cc4e7fdf484214e1936fc96104b96134632a8eb99558b3af743ac8bb8b
|
19
src/window.c
19
src/window.c
@ -150,9 +150,7 @@ static void row_numberStepFunc(
|
||||
sqlite3_value **apArg
|
||||
){
|
||||
i64 *p = (i64*)sqlite3_aggregate_context(pCtx, sizeof(*p));
|
||||
/* row_numberValueFunc() is always called first, so the aggregate context
|
||||
** is guaranteed to already exist. */
|
||||
if( ALWAYS(p) ) (*p)++;
|
||||
if( p ) (*p)++;
|
||||
UNUSED_PARAMETER(nArg);
|
||||
UNUSED_PARAMETER(apArg);
|
||||
}
|
||||
@ -184,8 +182,7 @@ static void dense_rankStepFunc(
|
||||
){
|
||||
struct CallCount *p;
|
||||
p = (struct CallCount*)sqlite3_aggregate_context(pCtx, sizeof(*p));
|
||||
/* p is not NULL because dense_rankValueFunc() will have been called first */
|
||||
if( ALWAYS(p) ) p->nStep = 1;
|
||||
if( p ) p->nStep = 1;
|
||||
UNUSED_PARAMETER(nArg);
|
||||
UNUSED_PARAMETER(apArg);
|
||||
}
|
||||
@ -214,8 +211,7 @@ static void rankStepFunc(
|
||||
){
|
||||
struct CallCount *p;
|
||||
p = (struct CallCount*)sqlite3_aggregate_context(pCtx, sizeof(*p));
|
||||
/* p is not NULL because rankValueFunc() will have been called first */
|
||||
if( ALWAYS(p) ){
|
||||
if( p ){
|
||||
p->nStep++;
|
||||
if( p->nValue==0 ){
|
||||
p->nValue = p->nStep;
|
||||
@ -248,8 +244,7 @@ static void percent_rankStepFunc(
|
||||
UNUSED_PARAMETER(nArg); assert( nArg==1 );
|
||||
|
||||
p = (struct CallCount*)sqlite3_aggregate_context(pCtx, sizeof(*p));
|
||||
/* p is not NULL because percent_rankValueFunc() will have been called */
|
||||
if( ALWAYS(p) ){
|
||||
if( p ){
|
||||
if( p->nTotal==0 ){
|
||||
p->nTotal = sqlite3_value_int64(apArg[0]);
|
||||
}
|
||||
@ -288,8 +283,7 @@ static void cume_distStepFunc(
|
||||
assert( nArg==1 ); UNUSED_PARAMETER(nArg);
|
||||
|
||||
p = (struct CallCount*)sqlite3_aggregate_context(pCtx, sizeof(*p));
|
||||
/* p is not NULL because cume_distValueFunc() will have been called first */
|
||||
if( ALWAYS(p) ){
|
||||
if( p ){
|
||||
if( p->nTotal==0 ){
|
||||
p->nTotal = sqlite3_value_int64(apArg[0]);
|
||||
}
|
||||
@ -328,8 +322,7 @@ static void ntileStepFunc(
|
||||
struct NtileCtx *p;
|
||||
assert( nArg==2 ); UNUSED_PARAMETER(nArg);
|
||||
p = (struct NtileCtx*)sqlite3_aggregate_context(pCtx, sizeof(*p));
|
||||
/* p is not NULL because ntimeValueFunc() will have been called first */
|
||||
if( ALWAYS(p) ){
|
||||
if( p ){
|
||||
if( p->nTotal==0 ){
|
||||
p->nParam = sqlite3_value_int64(apArg[0]);
|
||||
p->nTotal = sqlite3_value_int64(apArg[1]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user