1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Merge latest trunk changes.

FossilOrigin-Name: ebe65b2386a6132f4ef2cce6668a2da7db0798a70d2fba652882d5bccfd6672b
This commit is contained in:
dan
2018-06-22 17:57:10 +00:00
parent b7306f6f6e
commit 17074e3a9e
4 changed files with 21 additions and 10 deletions

View File

@@ -345,9 +345,8 @@ static void ntileStepFunc(
){
struct NtileCtx *p;
assert( nArg==2 );
assert( sqlite3VdbeAssertAggContext(pCtx) );
p = (struct NtileCtx*)sqlite3_aggregate_context(pCtx, sizeof(*p));
if( ALWAYS(p) ){
if( p ){
if( p->nTotal==0 ){
p->nParam = sqlite3_value_int64(apArg[0]);
p->nTotal = sqlite3_value_int64(apArg[1]);