diff options
Diffstat (limited to 'src/build.c')
-rw-r--r-- | src/build.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/build.c b/src/build.c index 0e8d4cf0e..f928ba307 100644 --- a/src/build.c +++ b/src/build.c @@ -1052,10 +1052,12 @@ begin_table_error: /* Set properties of a table column based on the (magical) ** name of the column. */ -void sqlite3ColumnPropertiesFromName(Column *pCol){ +void sqlite3ColumnPropertiesFromName(Table *pTab, Column *pCol){ #if SQLITE_ENABLE_HIDDEN_COLUMNS if( sqlite3_strnicmp(pCol->zName, "__hidden__", 10)==0 ){ pCol->colFlags |= COLFLAG_HIDDEN; + }else if( pTab && pCol!=pTab->aCol && (pCol[-1].colFlags & COLFLAG_HIDDEN) ){ + pTab->tabFlags |= TF_OOOHidden; } #endif } @@ -1103,7 +1105,7 @@ void sqlite3AddColumn(Parse *pParse, Token *pName){ pCol = &p->aCol[p->nCol]; memset(pCol, 0, sizeof(p->aCol[0])); pCol->zName = z; - sqlite3ColumnPropertiesFromName(pCol); + sqlite3ColumnPropertiesFromName(p, pCol); /* If there is no type specified, columns have the default affinity ** 'BLOB'. If there is a type specified, then sqlite3AddColumnType() will |