diff options
author | drh <drh@noemail.net> | 2019-12-07 13:42:47 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2019-12-07 13:42:47 +0000 |
commit | 29cdbadf8af1ea61e960c5fc7ce8a63efb009c1c (patch) | |
tree | 66ffc792f9141c443fa6ad30205603414dcd6aae /src | |
parent | c7a046e28267c9c912081f6ec8c68727bcd728f9 (diff) | |
download | sqlite-29cdbadf8af1ea61e960c5fc7ce8a63efb009c1c.tar.gz sqlite-29cdbadf8af1ea61e960c5fc7ce8a63efb009c1c.zip |
Correctly deal with multi-row VALUES clauses that contain window functions.
FossilOrigin-Name: 26d991f214db143976e2593d3564b5003eb3539a2728d1a0ccae2a2accece76f
Diffstat (limited to 'src')
-rw-r--r-- | src/select.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/select.c b/src/select.c index 8dd92dbab..26c72d6da 100644 --- a/src/select.c +++ b/src/select.c @@ -2474,6 +2474,7 @@ static int multiSelectValues( assert( p->selFlags & SF_Values ); assert( p->op==TK_ALL || (p->op==TK_SELECT && p->pPrior==0) ); assert( p->pNext==0 || p->pEList->nExpr==p->pNext->pEList->nExpr ); + if( p->pWin ) return -1; if( p->pPrior==0 ) break; assert( p->pPrior->pNext==p ); p = p->pPrior; @@ -2564,7 +2565,8 @@ static int multiSelect( */ if( p->selFlags & SF_MultiValue ){ rc = multiSelectValues(pParse, p, &dest); - goto multi_select_end; + if( rc>=0 ) goto multi_select_end; + rc = SQLITE_OK; } /* Make sure all SELECTs in the statement have the same number of elements |