aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2022-04-06 18:30:17 +0000
committerdrh <>2022-04-06 18:30:17 +0000
commitc2d0df95ba5312b420d7aa786ab805a5daeb1cc0 (patch)
tree9d0e31b4ea71389527359ef8c99b0fb9d1a30065 /src
parent2a7dcbfbb0e6fcd255fda917d0f28a10588b7dd0 (diff)
downloadsqlite-c2d0df95ba5312b420d7aa786ab805a5daeb1cc0.tar.gz
sqlite-c2d0df95ba5312b420d7aa786ab805a5daeb1cc0.zip
Improvements to the display of AST for DML statements.
FossilOrigin-Name: 84c239a071cfaf8af107646f01ef269e2915fd2384e95927d484f2e408ba6bbf
Diffstat (limited to 'src')
-rw-r--r--src/insert.c2
-rw-r--r--src/select.c8
-rw-r--r--src/sqliteInt.h4
-rw-r--r--src/treeview.c5
4 files changed, 14 insertions, 5 deletions
diff --git a/src/insert.c b/src/insert.c
index e56d03719..2593f353b 100644
--- a/src/insert.c
+++ b/src/insert.c
@@ -768,7 +768,7 @@ void sqlite3Insert(
#if TREETRACE_ENABLED
if( sqlite3TreeTrace & 0x10000 ){
sqlite3TreeViewLine(0, "In sqlite3Insert() at %s:%d", __FILE__, __LINE__);
- sqlite3TreeViewInsert(pParse->pWith, pTabList, pColumn, pSelect,
+ sqlite3TreeViewInsert(pParse->pWith, pTabList, pColumn, pSelect, pList,
onError, pUpsert, pTrigger);
}
#endif
diff --git a/src/select.c b/src/select.c
index d9348dc58..a0d94c0c8 100644
--- a/src/select.c
+++ b/src/select.c
@@ -6346,8 +6346,12 @@ int sqlite3Select(
if( sqlite3AuthCheck(pParse, SQLITE_SELECT, 0, 0, 0) ) return 1;
#if TREETRACE_ENABLED
SELECTTRACE(1,pParse,p, ("begin processing:\n", pParse->addrExplain));
- if( sqlite3TreeTrace & 0x100 ){
- sqlite3TreeViewSelect(0, p, 0);
+ if( sqlite3TreeTrace & 0x10100 ){
+ if( (sqlite3TreeTrace & 0x10001)==0x10000 ){
+ sqlite3TreeViewLine(0, "In sqlite3Select() at %s:%d",
+ __FILE__, __LINE__);
+ }
+ sqlite3ShowSelect(p);
}
#endif
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index ef2857345..a77df1d8b 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -4431,8 +4431,8 @@ char *sqlite3VMPrintf(sqlite3*,const char*, va_list);
void sqlite3TreeViewDelete(const With*, const SrcList*, const Expr*,
const ExprList*,const Expr*, const Trigger*);
void sqlite3TreeViewInsert(const With*, const SrcList*,
- const IdList*, const Select*, int,
- const Upsert*, const Trigger*);
+ const IdList*, const Select*, const ExprList*,
+ int, const Upsert*, const Trigger*);
void sqlite3TreeViewUpdate(const With*, const SrcList*, const ExprList*,
const Expr*, int, const ExprList*, const Expr*,
const Upsert*, const Trigger*);
diff --git a/src/treeview.c b/src/treeview.c
index a63f94bfd..7e1542463 100644
--- a/src/treeview.c
+++ b/src/treeview.c
@@ -947,6 +947,7 @@ void sqlite3TreeViewInsert(
const SrcList *pTabList,
const IdList *pColumnList,
const Select *pSelect,
+ const ExprList *pExprList,
int onError,
const Upsert *pUpsert,
const Trigger *pTrigger
@@ -967,6 +968,7 @@ void sqlite3TreeViewInsert(
if( pTabList ) n++;
if( pColumnList ) n++;
if( pSelect ) n++;
+ if( pExprList ) n++;
if( pUpsert ) n++;
if( pTrigger ) n++;
if( pWith ){
@@ -989,6 +991,9 @@ void sqlite3TreeViewInsert(
sqlite3TreeViewSelect(pView, pSelect, 0);
sqlite3TreeViewPop(&pView);
}
+ if( pExprList ){
+ sqlite3TreeViewExprList(pView, pExprList, (--n)>0, "VALUES");
+ }
if( pUpsert ){
sqlite3TreeViewPush(&pView, (--n)>0);
sqlite3TreeViewLine(pView, "UPSERT");