mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Return an error if a "RANGE" window-frame uses "<expr> PRECEDING" or "<expr>
FOLLOWING". FossilOrigin-Name: 786c87ba4150509e141baab32c51e64bbd3ce323735e0f47d65ed54d14215bc4
This commit is contained in:
10
src/window.c
10
src/window.c
@@ -837,7 +837,15 @@ Window *sqlite3WindowAlloc(
|
||||
int eStart, Expr *pStart,
|
||||
int eEnd, Expr *pEnd
|
||||
){
|
||||
Window *pWin = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
|
||||
Window *pWin = 0;
|
||||
|
||||
if( eType==TK_RANGE && (pStart || pEnd) ){
|
||||
sqlite3ErrorMsg(pParse, "RANGE %s is only supported with UNBOUNDED",
|
||||
(pStart ? "PRECEDING" : "FOLLOWING")
|
||||
);
|
||||
}else{
|
||||
pWin = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
|
||||
}
|
||||
|
||||
if( pWin ){
|
||||
assert( eType );
|
||||
|
Reference in New Issue
Block a user