aboutsummaryrefslogtreecommitdiff
path: root/src/select.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2019-08-15 21:27:20 +0000
committerdrh <drh@noemail.net>2019-08-15 21:27:20 +0000
commit11d88e68abdf23f131dca81ad8d3517a5cf8449b (patch)
tree8381b7ba81b7f17b2556a738718ab5ee4a369e8a /src/select.c
parent725dd72400872da94dcfb6af48128905b93d57fe (diff)
downloadsqlite-11d88e68abdf23f131dca81ad8d3517a5cf8449b.tar.gz
sqlite-11d88e68abdf23f131dca81ad8d3517a5cf8449b.zip
Add the SQLITE_DBCONFIG_ENABLE_VIEW option, together with a "db config"
command in the TCL interface that can access that option as well as all the other sqlite3_db_config() boolean options. FossilOrigin-Name: 61b4bccd2984f4c2cf50f58ef08677588e57aa7e079af07473b2e188d9ce4f52
Diffstat (limited to 'src/select.c')
-rw-r--r--src/select.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/select.c b/src/select.c
index ca1256d16..bd8fee87e 100644
--- a/src/select.c
+++ b/src/select.c
@@ -4906,6 +4906,10 @@ static int selectExpander(Walker *pWalker, Select *p){
u8 eCodeOrig = pWalker->eCode;
if( sqlite3ViewGetColumnNames(pParse, pTab) ) return WRC_Abort;
assert( pFrom->pSelect==0 );
+ if( pTab->pSelect && (db->flags & SQLITE_EnableView)==0 ){
+ sqlite3ErrorMsg(pParse, "access to view \"%s\" prohibited",
+ pTab->zName);
+ }
pFrom->pSelect = sqlite3SelectDup(db, pTab->pSelect, 0);
nCol = pTab->nCol;
pTab->nCol = -1;