aboutsummaryrefslogtreecommitdiff
path: root/src/treeview.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2020-03-10 19:24:38 +0000
committerdrh <drh@noemail.net>2020-03-10 19:24:38 +0000
commite7375bfa727bfa12649897fd6a655f81b703f0db (patch)
treeceb8af56043e8a55900b807487cf3cbc0799e4cf /src/treeview.c
parent5cf1b611a20201aa141b258901cbfc2950e2037e (diff)
downloadsqlite-e7375bfa727bfa12649897fd6a655f81b703f0db.tar.gz
sqlite-e7375bfa727bfa12649897fd6a655f81b703f0db.zip
Enhanced detection logic for preventing the use of static schema expressions
by code generating routines. FossilOrigin-Name: 5f60b527b938c0778e8f725c635ce0dc5ed7a4e01fd6252aa2cdb64da2f625bc
Diffstat (limited to 'src/treeview.c')
-rw-r--r--src/treeview.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/treeview.c b/src/treeview.c
index 90a1d2dcc..2d9da5507 100644
--- a/src/treeview.c
+++ b/src/treeview.c
@@ -398,14 +398,14 @@ void sqlite3TreeViewWinFunc(TreeView *pView, const Window *pWin, u8 more){
void sqlite3TreeViewExpr(TreeView *pView, const Expr *pExpr, u8 moreToFollow){
const char *zBinOp = 0; /* Binary operator */
const char *zUniOp = 0; /* Unary operator */
- char zFlgs[60];
+ char zFlgs[200];
pView = sqlite3TreeViewPush(pView, moreToFollow);
if( pExpr==0 ){
sqlite3TreeViewLine(pView, "nil");
sqlite3TreeViewPop(pView);
return;
}
- if( pExpr->flags || pExpr->affExpr ){
+ if( pExpr->flags || pExpr->affExpr || pExpr->vvaFlags ){
StrAccum x;
sqlite3StrAccumInit(&x, 0, zFlgs, sizeof(zFlgs), 0);
sqlite3_str_appendf(&x, " fg.af=%x.%c",
@@ -416,6 +416,9 @@ void sqlite3TreeViewExpr(TreeView *pView, const Expr *pExpr, u8 moreToFollow){
if( ExprHasProperty(pExpr, EP_FromDDL) ){
sqlite3_str_appendf(&x, " DDL");
}
+ if( ExprHasVVAProperty(pExpr, EP_Immutable) ){
+ sqlite3_str_appendf(&x, " IMMUTABLE");
+ }
sqlite3StrAccumFinish(&x);
}else{
zFlgs[0] = 0;
@@ -522,6 +525,7 @@ void sqlite3TreeViewExpr(TreeView *pView, const Expr *pExpr, u8 moreToFollow){
case TK_RSHIFT: zBinOp = "RSHIFT"; break;
case TK_CONCAT: zBinOp = "CONCAT"; break;
case TK_DOT: zBinOp = "DOT"; break;
+ case TK_LIMIT: zBinOp = "LIMIT"; break;
case TK_UMINUS: zUniOp = "UMINUS"; break;
case TK_UPLUS: zUniOp = "UPLUS"; break;