1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Minor simplification of error message generation during compound query

code generation.

FossilOrigin-Name: a944719314e0ac2f1954b65668815769eba3ab3e39a74666293b8dea52a184b2
This commit is contained in:
drh
2017-09-18 13:16:10 +00:00
parent edea4a7cc9
commit 63347e7df8
3 changed files with 10 additions and 16 deletions

View File

@@ -2281,15 +2281,9 @@ static int multiSelect(
db = pParse->db;
pPrior = p->pPrior;
dest = *pDest;
if( pPrior->pOrderBy ){
sqlite3ErrorMsg(pParse,"ORDER BY clause should come after %s not before",
selectOpName(p->op));
rc = 1;
goto multi_select_end;
}
if( pPrior->pLimit ){
sqlite3ErrorMsg(pParse,"LIMIT clause should come after %s not before",
selectOpName(p->op));
if( pPrior->pOrderBy || pPrior->pLimit ){
sqlite3ErrorMsg(pParse,"%s clause should come after %s not before",
pPrior->pOrderBy!=0 ? "ORDER BY" : "LIMIT", selectOpName(p->op));
rc = 1;
goto multi_select_end;
}