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

Merge trunk changes into the cursor-hints branch.

FossilOrigin-Name: fbe637620fb7f2c9395c9ddac77d26746d6d4178
This commit is contained in:
drh
2015-09-24 15:06:30 +00:00
39 changed files with 712 additions and 288 deletions

View File

@@ -4267,9 +4267,12 @@ static int selectExpander(Walker *pWalker, Select *p){
pTab->nRef++;
#if !defined(SQLITE_OMIT_VIEW) || !defined (SQLITE_OMIT_VIRTUALTABLE)
if( pTab->pSelect || IsVirtual(pTab) ){
/* We reach here if the named table is a really a view */
if( sqlite3ViewGetColumnNames(pParse, pTab) ) return WRC_Abort;
assert( pFrom->pSelect==0 );
if( pFrom->fg.isTabFunc && !IsVirtual(pTab) ){
sqlite3ErrorMsg(pParse, "'%s' is not a function", pTab->zName);
return WRC_Abort;
}
pFrom->pSelect = sqlite3SelectDup(db, pTab->pSelect, 0);
sqlite3SelectSetName(pFrom->pSelect, pTab->zName);
sqlite3WalkSelect(pWalker, pFrom->pSelect);