/ Check-in [3071ba2b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Honor the "__hidden__" prefix on the columns of views.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | hidden-columns-in-tables
Files: files | file ages | folders
SHA1:3071ba2bdbda7018d0a285eceb04b8527209ec1e
User & Date: drh 2015-11-18 20:57:50
Context
2015-11-18
20:59
Add tests for views to hidden.test. check-in: 27d4b6f5 user: dan tags: hidden-columns-in-tables
20:57
Honor the "__hidden__" prefix on the columns of views. check-in: 3071ba2b user: drh tags: hidden-columns-in-tables
20:07
Add a test for the __hidden__ hack on this branch. check-in: ebf4bbff user: dan tags: hidden-columns-in-tables
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/select.c.

  1655   1655           for(j=nName-1; j>0 && sqlite3Isdigit(zName[j]); j--){}
  1656   1656           if( zName[j]==':' ) nName = j;
  1657   1657         }
  1658   1658         zName = sqlite3MPrintf(db, "%.*z:%u", nName, zName, ++cnt);
  1659   1659         if( cnt>3 ) sqlite3_randomness(sizeof(cnt), &cnt);
  1660   1660       }
  1661   1661       pCol->zName = zName;
  1662         -    if( zName && sqlite3HashInsert(&ht, zName, pCol)==pCol ){
  1663         -      db->mallocFailed = 1;
         1662  +    if( zName ){
         1663  +      if( sqlite3HashInsert(&ht, zName, pCol)==pCol ){
         1664  +        db->mallocFailed = 1;
         1665  +      }else if( sqlite3_strnicmp(zName, "__hidden__", 10)==0 ){
         1666  +        pCol->colFlags |= COLFLAG_HIDDEN;
         1667  +      }
  1664   1668       }
  1665   1669     }
  1666   1670     sqlite3HashClear(&ht);
  1667   1671     if( db->mallocFailed ){
  1668   1672       for(j=0; j<i; j++){
  1669   1673         sqlite3DbFree(db, aCol[j].zName);
  1670   1674       }