diff options
author | drh <drh@noemail.net> | 2015-11-18 18:43:15 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-11-18 18:43:15 +0000 |
commit | f0c9145a3609c17ba53aed561657c53be343e2e8 (patch) | |
tree | 8fb4251e6358de6483628ecf49828c183d92199e /src/insert.c | |
parent | c88cd1375358a4adbc52f45a8c81d20008c8622a (diff) | |
download | sqlite-f0c9145a3609c17ba53aed561657c53be343e2e8.tar.gz sqlite-f0c9145a3609c17ba53aed561657c53be343e2e8.zip |
If a table column name begins with "__hidden__" then do not include that
column in "*" expansions in SELECT statements, nor fill in that column in
an INSERT INTO that omits the column list. <b>This branch is a
proof-of-concept only and is not intended to ever be merged into trunk.</b>
FossilOrigin-Name: 2dbffb3a3b20dba7d7d86c8ad2e34633f616c78a
Diffstat (limited to 'src/insert.c')
-rw-r--r-- | src/insert.c | 9 |
1 files changed, 4 insertions, 5 deletions
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{ |