mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-08 03:22:21 +03:00
Fix for ticket #100: Correctly handle ON and USING clauses of JOINs within
a VIEW. (CVS 679) FossilOrigin-Name: 93710f7ed7e1baa6acbf4bc32982e046f61ffa44
This commit is contained in:
11
src/expr.c
11
src/expr.c
@@ -12,7 +12,7 @@
|
||||
** This file contains routines used for analyzing expressions and
|
||||
** for generating VDBE code that evaluates expressions in SQLite.
|
||||
**
|
||||
** $Id: expr.c,v 1.77 2002/07/02 13:05:05 drh Exp $
|
||||
** $Id: expr.c,v 1.78 2002/07/16 02:05:44 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@@ -137,9 +137,18 @@ void sqliteExprListMoveStrings(ExprList *pList, int offset){
|
||||
sqliteExprMoveStrings(pList->a[i].pExpr, offset);
|
||||
}
|
||||
}
|
||||
static void sqliteSrcListMoveStrings(SrcList *pSrc, int offset){
|
||||
int i;
|
||||
if( pSrc==0 ) return;
|
||||
for(i=0; i<pSrc->nSrc; i++){
|
||||
sqliteSelectMoveStrings(pSrc->a[i].pSelect, offset);
|
||||
sqliteExprMoveStrings(pSrc->a[i].pOn, offset);
|
||||
}
|
||||
}
|
||||
void sqliteSelectMoveStrings(Select *pSelect, int offset){
|
||||
if( pSelect==0 ) return;
|
||||
sqliteExprListMoveStrings(pSelect->pEList, offset);
|
||||
sqliteSrcListMoveStrings(pSelect->pSrc, offset);
|
||||
sqliteExprMoveStrings(pSelect->pWhere, offset);
|
||||
sqliteExprListMoveStrings(pSelect->pGroupBy, offset);
|
||||
sqliteExprMoveStrings(pSelect->pHaving, offset);
|
||||
|
||||
Reference in New Issue
Block a user