diff options
author | drh <drh@noemail.net> | 2020-04-03 13:19:03 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2020-04-03 13:19:03 +0000 |
commit | c415d91007e1680e4eb17def583b202c3c83c718 (patch) | |
tree | 2daab2d5dc750a3325634b2609726d15219bba7f /src | |
parent | 4db7ab53f9c30e2e22731ace93ab6b18eef6c4ae (diff) | |
download | sqlite-c415d91007e1680e4eb17def583b202c3c83c718.tar.gz sqlite-c415d91007e1680e4eb17def583b202c3c83c718.zip |
In the event of a semantic error in an aggregate query, early-out the
resetAccumulator() function to prevent problems due to incomplete or
incorrect initialization of the AggInfo object.
Fix for ticket [af4556bb5c285c08].
FossilOrigin-Name: 4a302b42c7bf5e11ddb5522ca999f74aba397d3a7eb91b1844bb02852f772441
Diffstat (limited to 'src')
-rw-r--r-- | src/select.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/select.c b/src/select.c index b2dd5f149..59ba706fc 100644 --- a/src/select.c +++ b/src/select.c @@ -5388,6 +5388,7 @@ static void resetAccumulator(Parse *pParse, AggInfo *pAggInfo){ struct AggInfo_func *pFunc; int nReg = pAggInfo->nFunc + pAggInfo->nColumn; if( nReg==0 ) return; + if( pParse->nErr ) return; #ifdef SQLITE_DEBUG /* Verify that all AggInfo registers are within the range specified by ** AggInfo.mnReg..AggInfo.mxReg */ |