]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
If compiled with SQLITE_ENABLE_HIDDEN_COLUMNS, then columns in ordinary
authordrh <drh@noemail.net>
Thu, 19 Nov 2015 14:11:58 +0000 (14:11 +0000)
committerdrh <drh@noemail.net>
Thu, 19 Nov 2015 14:11:58 +0000 (14:11 +0000)
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.

FossilOrigin-Name: 011904cad2be2ce34e2f37ffae8ff2f1044a2969

1  2 
manifest
manifest.uuid
src/build.c

diff --cc manifest
index 7b6fa36f040bfad1bd068806f48543a5c74a19de,8fd60806d433c0afb3034df3d604a25ef21649bd..10477abd8d18abee267153ebdf037e84d7cf143c
+++ b/manifest
@@@ -1,5 -1,5 +1,5 @@@
- C Fix\sa\s10-year-old\smisguided\sattempt\sat\sparser\sperformance\simprovement\sthat\nactually\smade\sparsing\sslightly\sslower.
- D 2015-11-19T13:21:31.911
 -C Only\ssupport\sthe\smagic\s"__hidden__"\scolumn\sname\sprefix\sinterpretation\swhen\ncompiled\swith\sSQLITE_ENABLE_HIDDEN_COLUMNS.
 -D 2015-11-19T13:53:57.338
++C If\scompiled\swith\sSQLITE_ENABLE_HIDDEN_COLUMNS,\sthen\scolumns\sin\sordinary\ntables\sand\sviews\sthat\shave\snames\sbeginning\swith\s"__hidden__"\sare\somitted\sfrom\nthe\s"*"\sexpansion\sin\sSELECT\sstatements\sand\sfrom\sthe\sautomatic\slist\sof\scolumns\nfollowing\sthe\stable\sname\sin\san\sINSERT\sINTO\sstatement.
++D 2015-11-19T14:11:58.858
  F Makefile.in d828db6afa6c1fa060d01e33e4674408df1942a1
  F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
  F Makefile.msc e928e68168df69b353300ac87c10105206653a03
@@@ -285,7 -285,7 +285,7 @@@ F src/btmutex.c 45a968cc85afed9b5e6cf55
  F src/btree.c d3bdd8462a86492e2ebc9aca4a0168429017de25
  F src/btree.h 2d76dee44704c47eed323356a758662724b674a0
  F src/btreeInt.h 3ab435ed27adea54d040584b0bcc488ee7db1e38
- F src/build.c baee971344208e212573c08f6bd5579023cc5d14
 -F src/build.c c67e12bdafb58983175b22c889610ee32c187115
++F src/build.c c909d178ef900f56aaafa4a509fd1b12a7d52ea6
  F src/callback.c 7b44ce59674338ad48b0e84e7b72f935ea4f68b0
  F src/complete.c addcd8160b081131005d5bc2d34adf20c1c5c92f
  F src/ctime.c 509ef9c64d1321f42448f111da86400b1799218a
@@@ -1403,7 -1404,7 +1404,8 @@@ F tool/vdbe_profile.tcl 246d0da094856d7
  F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
  F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
  F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
- P 4f521b5bb36a1117db324e92dcf80abd2f1a5bc1
- R cfcad521008e112c6b761003fe8dc627
 -P 20c1e9ce75cc0b5f7456379f35a4fe24edd98088
 -R b681b2e3a18e987eaa1eccff39189bf0
++P 3833cbac0706ecac9a641d70b786d26f7e1a42b1 5490646b2eb74ea8bd5ab2690f69b9c707a0165f
++R 4afe49c98c7e846f7bc0bfa4d2728afc
++T +closed 5490646b2eb74ea8bd5ab2690f69b9c707a0165f
  U drh
- Z 7e2a0f5e909f9722ed5527dda015ff6e
 -Z 0c3369445e405737c5be7849ea75e5f3
++Z 1e726fa67e18842e3c05f4f72e06c5dc
diff --cc manifest.uuid
index 25fa29f661073a212c89cdb47cf9360e9bbc1b47,0201a434ee3118cd295a1ef3b860003f493129be..3567556e2ec045001b39792e7d770936b8994081
@@@ -1,1 -1,1 +1,1 @@@
- 3833cbac0706ecac9a641d70b786d26f7e1a42b1
 -5490646b2eb74ea8bd5ab2690f69b9c707a0165f
++011904cad2be2ce34e2f37ffae8ff2f1044a2969
diff --cc src/build.c
index a46bb585208009f4f0a58d5e6ec72e0adc21253e,65f94d2348adab980e6fbf9699f1ed5779243b8b..0e8d4cf0ea828cbc91b0ea91864b422964b80036
@@@ -1049,6 -1049,31 +1049,18 @@@ begin_table_error
    return;
  }
  
 -/*
 -** 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
 -** returns true if the two strings are equal, otherwise false.
 -*/
 -#define STRICMP(x, y) (\
 -sqlite3UpperToLower[*(unsigned char *)(x)]==   \
 -sqlite3UpperToLower[*(unsigned char *)(y)]     \
 -&& sqlite3StrICmp((x)+1,(y)+1)==0 )
 -
+ /* 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
+ }
  /*
  ** Add a new column to the table currently being constructed.
  **