diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/build.c | 3 | ||||
-rw-r--r-- | src/insert.c | 9 | ||||
-rw-r--r-- | src/select.c | 3 |
3 files changed, 9 insertions, 6 deletions
diff --git a/src/build.c b/src/build.c index 8cb2d44ac..9a4a0cc8d 100644 --- a/src/build.c +++ b/src/build.c @@ -1104,6 +1104,9 @@ void sqlite3AddColumn(Parse *pParse, Token *pName){ pCol = &p->aCol[p->nCol]; memset(pCol, 0, sizeof(p->aCol[0])); pCol->zName = z; + if( sqlite3_strnicmp(z, "__hidden__", 10)==0 ){ + pCol->colFlags |= COLFLAG_HIDDEN; + } /* If there is no type specified, columns have the default affinity ** 'BLOB'. If there is a type specified, then sqlite3AddColumnType() will diff --git a/src/insert.c b/src/insert.c index 3d213a8d3..2c159fd2b 100644 --- a/src/insert.c +++ b/src/insert.c @@ -736,10 +736,8 @@ void sqlite3Insert( /* Make sure the number of columns in the source data matches the number ** of columns to be inserted into the table. */ - if( IsVirtual(pTab) ){ - for(i=0; i<pTab->nCol; i++){ - nHidden += (IsHiddenColumn(&pTab->aCol[i]) ? 1 : 0); - } + for(i=0; i<pTab->nCol; i++){ + nHidden += (IsHiddenColumn(&pTab->aCol[i]) ? 1 : 0); } if( pColumn==0 && nColumn && nColumn!=(pTab->nCol-nHidden) ){ sqlite3ErrorMsg(pParse, @@ -934,7 +932,8 @@ void sqlite3Insert( } if( pColumn==0 ){ if( IsHiddenColumn(&pTab->aCol[i]) ){ - assert( IsVirtual(pTab) ); + assert( IsVirtual(pTab) + || sqlite3_strnicmp(pTab->aCol[i].zName,"__hidden__",10)==0 ); j = -1; nHidden++; }else{ diff --git a/src/select.c b/src/select.c index 126d4cc28..41a3c50a5 100644 --- a/src/select.c +++ b/src/select.c @@ -4365,7 +4365,8 @@ static int selectExpander(Walker *pWalker, Select *p){ ** result-set list. */ if( IsHiddenColumn(&pTab->aCol[j]) ){ - assert(IsVirtual(pTab)); + assert( IsVirtual(pTab) + || sqlite3_strnicmp(pTab->aCol[j].zName,"__hidden__", 10)==0 ); continue; } tableSeen = 1; |