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

Fix a problem with using window functions in compound (UNION, INTERSECT etc.)

queries.

FossilOrigin-Name: 059ff53a46c7f1e4bf3e7dc558312beef67826c2753e2ab7e4e7df498b37b617
This commit is contained in:
dan
2018-10-23 13:48:19 +00:00
parent 46de072880
commit 0f5f54062c
4 changed files with 54 additions and 9 deletions

View File

@@ -746,7 +746,7 @@ static ExprList *exprListAppendList(
*/
int sqlite3WindowRewrite(Parse *pParse, Select *p){
int rc = SQLITE_OK;
if( p->pWin ){
if( p->pWin && p->pPrior==0 ){
Vdbe *v = sqlite3GetVdbe(pParse);
sqlite3 *db = pParse->db;
Select *pSub = 0; /* The subquery */