Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch hidden-columns-in-tables Excluding Merge-Ins
This is equivalent to a diff from 4f521b5bb3 to 5490646b2e
2015-11-19
| ||
14:11 | If compiled with SQLITE_ENABLE_HIDDEN_COLUMNS, then columns in ordinary tables and views that have names beginning with "__hidden__" are omitted from the "*" expansion in SELECT statements and from the automatic list of columns following the table name in an INSERT INTO statement. (check-in: 011904cad2 user: drh tags: trunk) | |
13:53 | Only support the magic "__hidden__" column name prefix interpretation when compiled with SQLITE_ENABLE_HIDDEN_COLUMNS. (Closed-Leaf check-in: 5490646b2e user: drh tags: hidden-columns-in-tables) | |
13:21 | Fix a 10-year-old misguided attempt at parser performance improvement that actually made parsing slightly slower. (check-in: 3833cbac07 user: drh tags: trunk) | |
2015-11-18
| ||
21:22 | Get the __hidden__ column mechanism working on views with INSTEAD OF triggers. (check-in: 20c1e9ce75 user: drh tags: hidden-columns-in-tables) | |
18:43 | 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. <i>This branch is a proof-of-concept only and is not intended to ever be merged into trunk.</i> (check-in: 2dbffb3a3b user: drh tags: hidden-columns-in-tables) | |
2015-11-17
| ||
21:42 | When using mmap mode on Win32, use a read-only mapping by default. Write to the database file using WriteFile(). Unless SQLITE_MMAP_READWRITE is defined, in which case use a read/write mapping and write into the file using memcpy(). (check-in: 4f521b5bb3 user: mistachkin tags: trunk) | |
20:56 | When using mmap mode on unix, use a read-only mapping by default. Write to the database file using write(). Unless SQLITE_MMAP_READWRITE is defined, in which case use a read/write mapping and write into the file using memcpy(). (check-in: 67c5d3c646 user: dan tags: trunk) | |
Changes to src/build.c.
︙ | |||
1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 | 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 | + + + + + + + + + + + + | return; /* If an error occurs, we jump here */ begin_table_error: sqlite3DbFree(db, zName); return; } /* Set properties of a table column based on the (magical) ** name of the column. */ void sqlite3ColumnPropertiesFromName(Column *pCol){ #if SQLITE_ENABLE_HIDDEN_COLUMNS if( sqlite3_strnicmp(pCol->zName, "__hidden__", 10)==0 ){ pCol->colFlags |= COLFLAG_HIDDEN; } #endif } /* ** This macro is used to compare two strings in a case-insensitive manner. ** It is slightly faster than calling sqlite3StrICmp() directly, but ** produces larger code. ** ** WARNING: This macro is not compatible with the strcmp() family. It |
︙ | |||
1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 | 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 | + | return; } p->aCol = aNew; } pCol = &p->aCol[p->nCol]; memset(pCol, 0, sizeof(p->aCol[0])); pCol->zName = z; sqlite3ColumnPropertiesFromName(pCol); /* If there is no type specified, columns have the default affinity ** 'BLOB'. If there is a type specified, then sqlite3AddColumnType() will ** be called next to set pCol->affinity correctly. */ pCol->affinity = SQLITE_AFF_BLOB; pCol->szEst = 1; |
︙ |
Changes to src/insert.c.
︙ | |||
732 733 734 735 736 737 738 | 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 | - - - + + - | if( pColumn==0 && nColumn>0 ){ ipkColumn = pTab->iPKey; } /* Make sure the number of columns in the source data matches the number ** of columns to be inserted into the table. */ |
︙ | |||
831 832 833 834 835 836 837 | 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 | - - + + - - - + + + | /* Cannot have triggers on a virtual table. If it were possible, ** this block would have to account for hidden column. */ assert( !IsVirtual(pTab) ); /* Create the new column data */ |
︙ | |||
930 931 932 933 934 935 936 | 928 929 930 931 932 933 934 935 936 937 938 939 940 941 | - | ** taking up data space with information that will never be used. ** As there may be shallow copies of this value, make it a soft-NULL */ sqlite3VdbeAddOp1(v, OP_SoftNull, iRegStore); continue; } if( pColumn==0 ){ if( IsHiddenColumn(&pTab->aCol[i]) ){ |
︙ |
Changes to src/select.c.
︙ | |||
1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 | 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 | + | 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; sqlite3ColumnPropertiesFromName(pCol); if( zName && sqlite3HashInsert(&ht, zName, pCol)==pCol ){ db->mallocFailed = 1; } } sqlite3HashClear(&ht); if( db->mallocFailed ){ for(j=0; j<i; j++){ |
︙ | |||
4356 4357 4358 4359 4360 4361 4362 | 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 | - + - - + - | assert( zName ); if( zTName && pSub && sqlite3MatchSpanName(pSub->pEList->a[j].zSpan, 0, zTName, 0)==0 ){ continue; } |
︙ |
Changes to src/sqliteInt.h.
︙ | |||
1692 1693 1694 1695 1696 1697 1698 | 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 | - + + + + + + + + + + + + + + + + + + | /* ** Test to see whether or not a table is a virtual table. This is ** done as a macro so that it will be optimized out when virtual ** table support is omitted from the build. */ #ifndef SQLITE_OMIT_VIRTUALTABLE # define IsVirtual(X) (((X)->tabFlags & TF_Virtual)!=0) |
︙ | |||
3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 | 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 | + | void sqlite3DeleteColumnNames(sqlite3*,Table*); int sqlite3ColumnsFromExprList(Parse*,ExprList*,i16*,Column**); Table *sqlite3ResultSetOfSelect(Parse*,Select*); void sqlite3OpenMasterTable(Parse *, int); Index *sqlite3PrimaryKeyIndex(Table*); i16 sqlite3ColumnOfIndex(Index*, i16); void sqlite3StartTable(Parse*,Token*,Token*,int,int,int,int); void sqlite3ColumnPropertiesFromName(Column*); void sqlite3AddColumn(Parse*,Token*); void sqlite3AddNotNull(Parse*, int); void sqlite3AddPrimaryKey(Parse*, ExprList*, int, int, int); void sqlite3AddCheckConstraint(Parse*, Expr*); void sqlite3AddColumnType(Parse*,Token*); void sqlite3AddDefaultValue(Parse*,ExprSpan*); void sqlite3AddCollateType(Parse*, Token*); |
︙ |
Changes to src/test_config.c.
︙ | |||
120 121 122 123 124 125 126 127 128 129 130 131 132 133 | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | + + + + + + | #endif #ifdef SQLITE_ENABLE_CURSOR_HINTS Tcl_SetVar2(interp, "sqlite_options", "cursorhints", "1", TCL_GLOBAL_ONLY); #else Tcl_SetVar2(interp, "sqlite_options", "cursorhints", "0", TCL_GLOBAL_ONLY); #endif #ifdef SQLITE_ENABLE_HIDDEN_COLUMNS Tcl_SetVar2(interp, "sqlite_options", "hiddencolumns", "1", TCL_GLOBAL_ONLY); #else Tcl_SetVar2(interp, "sqlite_options", "hiddencolumns", "0", TCL_GLOBAL_ONLY); #endif #ifdef SQLITE_ENABLE_MEMSYS3 Tcl_SetVar2(interp, "sqlite_options", "mem3", "1", TCL_GLOBAL_ONLY); #else Tcl_SetVar2(interp, "sqlite_options", "mem3", "0", TCL_GLOBAL_ONLY); #endif |
︙ |
Added test/hidden.test.
|
Changes to test/releasetest.tcl.
︙ | |||
115 116 117 118 119 120 121 122 123 124 125 126 127 128 | 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | + | -DSQLITE_TCL_DEFAULT_FULLMUTEX=1 -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_MEMSYS5=1 -DSQLITE_ENABLE_MEMSYS3=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_HIDDEN_COLUMNS -DSQLITE_MAX_ATTACHED=125 } "Fast-One" { -O6 -DSQLITE_ENABLE_FTS4=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_STAT4 |
︙ | |||
141 142 143 144 145 146 147 148 149 150 151 152 153 154 | 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | + | -DSQLITE_ENABLE_ATOMIC_WRITE=1 -DSQLITE_ENABLE_IOTRACE=1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 -DSQLITE_MAX_PAGE_SIZE=4096 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_OMIT_PROGRESS_CALLBACK=1 -DSQLITE_OMIT_VIRTUALTABLE=1 -DSQLITE_ENABLE_HIDDEN_COLUMNS -DSQLITE_TEMP_STORE=3 --enable-json1 } "Device-Two" { -DSQLITE_4_BYTE_ALIGNED_MALLOC=1 -DSQLITE_DEFAULT_AUTOVACUUM=1 -DSQLITE_DEFAULT_CACHE_SIZE=1000 |
︙ | |||
209 210 211 212 213 214 215 216 217 218 219 220 221 222 | 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | + | -DSQLITE_OMIT_LOOKASIDE=1 -DHAVE_USLEEP=1 } "Valgrind" { -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_HIDDEN_COLUMNS --enable-json1 } # The next group of configurations are used only by the # Failure-Detection platform. They are all the same, but we need # different names for them all so that they results appear in separate # subdirectories. |
︙ |