1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Make sure the names of all expressions in compound SELECT statements used

as subqueries are correctly resolved.  Ticket #2018. (CVS 3477)

FossilOrigin-Name: b886eaa334150262ce4d1a1d0470ca4cf623a396
This commit is contained in:
drh
2006-10-13 15:34:16 +00:00
parent 5048962a0f
commit f6bbe022c7
4 changed files with 53 additions and 12 deletions

View File

@@ -12,7 +12,7 @@
** This file contains C code routines that are called by the parser
** to handle SELECT statements in SQLite.
**
** $Id: select.c,v 1.321 2006/09/29 14:01:05 drh Exp $
** $Id: select.c,v 1.322 2006/10/13 15:34:17 drh Exp $
*/
#include "sqliteInt.h"
@@ -2605,7 +2605,14 @@ int sqlite3SelectResolve(
}
}
return SQLITE_OK;
/* If this is one SELECT of a compound, be sure to resolve names
** in the other SELECTs.
*/
if( p->pPrior ){
return sqlite3SelectResolve(pParse, p->pPrior, pOuterNC);
}else{
return SQLITE_OK;
}
}
/*