mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Fix for ticket #35: Ignore any ORDER BY clause on a subquery in a FROM clause. (CVS 557)
FossilOrigin-Name: 1b0ee944c9af10078aba628e85d79f8682afa2b6
This commit is contained in:
10
src/parse.y
10
src/parse.y
@ -14,7 +14,7 @@
|
||||
** the parser. Lemon will also generate a header file containing
|
||||
** numeric codes for all of the tokens.
|
||||
**
|
||||
** @(#) $Id: parse.y,v 1.62 2002/04/20 14:24:42 drh Exp $
|
||||
** @(#) $Id: parse.y,v 1.63 2002/05/08 21:46:15 drh Exp $
|
||||
*/
|
||||
%token_prefix TK_
|
||||
%token_type {Token}
|
||||
@ -283,10 +283,18 @@ seltablist(A) ::= stl_prefix(X) ids(Y) as ids(Z). {
|
||||
seltablist(A) ::= stl_prefix(X) LP select(S) RP. {
|
||||
A = sqliteIdListAppend(X,0);
|
||||
A->a[A->nId-1].pSelect = S;
|
||||
if( S->pOrderBy ){
|
||||
sqliteExprListDelete(S->pOrderBy);
|
||||
S->pOrderBy = 0;
|
||||
}
|
||||
}
|
||||
seltablist(A) ::= stl_prefix(X) LP select(S) RP as ids(Z). {
|
||||
A = sqliteIdListAppend(X,0);
|
||||
A->a[A->nId-1].pSelect = S;
|
||||
if( S->pOrderBy ){
|
||||
sqliteExprListDelete(S->pOrderBy);
|
||||
S->pOrderBy = 0;
|
||||
}
|
||||
sqliteIdListAddAlias(A,&Z);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user