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

Honor the "__hidden__" prefix on the columns of views.

FossilOrigin-Name: 3071ba2bdbda7018d0a285eceb04b8527209ec1e
This commit is contained in:
drh
2015-11-18 20:57:50 +00:00
parent d1ce65fc76
commit 6aed239acc
3 changed files with 14 additions and 10 deletions

View File

@@ -1659,8 +1659,12 @@ int sqlite3ColumnsFromExprList(
if( cnt>3 ) sqlite3_randomness(sizeof(cnt), &cnt);
}
pCol->zName = zName;
if( zName && sqlite3HashInsert(&ht, zName, pCol)==pCol ){
db->mallocFailed = 1;
if( zName ){
if( sqlite3HashInsert(&ht, zName, pCol)==pCol ){
db->mallocFailed = 1;
}else if( sqlite3_strnicmp(zName, "__hidden__", 10)==0 ){
pCol->colFlags |= COLFLAG_HIDDEN;
}
}
}
sqlite3HashClear(&ht);