https://sqlite.org/src/info/e8275b415a2f03bee https://sqlite.org/src/info/7fc2994434c7d9ed --- /sqlite3.c +++ /sqlite3.c @@ -125441,6 +125441,13 @@ Expr *pLimit; /* Saved LIMIT and OFFSET */ int regLimit, regOffset; /* Registers used by LIMIT and OFFSET */ +#ifndef SQLITE_OMIT_WINDOWFUNC + if( p->pWin ){ + sqlite3ErrorMsg(pParse, "cannot use window functions in recursive queries"); + return; + } +#endif + /* Obtain authorization to do a recursive query */ if( sqlite3AuthCheck(pParse, SQLITE_RECURSIVE, 0, 0, 0) ) return;