/ 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 Unified Diffs Show Whitespace Changes Patch

Changes to src/select.c.

1655
1656
1657
1658
1659
1660
1661

1662
1663



1664
1665
1666
1667
1668
1669
1670
        for(j=nName-1; j>0 && sqlite3Isdigit(zName[j]); j--){}
        if( zName[j]==':' ) nName = j;
      }
      zName = sqlite3MPrintf(db, "%.*z:%u", nName, zName, ++cnt);
      if( cnt>3 ) sqlite3_randomness(sizeof(cnt), &cnt);
    }
    pCol->zName = zName;

    if( zName && sqlite3HashInsert(&ht, zName, pCol)==pCol ){
      db->mallocFailed = 1;



    }
  }
  sqlite3HashClear(&ht);
  if( db->mallocFailed ){
    for(j=0; j<i; j++){
      sqlite3DbFree(db, aCol[j].zName);
    }







>
|
|
>
>
>







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