From: drh <> Date: Thu, 19 Oct 2023 19:08:33 +0000 (+0000) Subject: In the TreeView logic (used for debugging only) do not show unnecessary fields X-Git-Tag: version-3.44.0~84 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d8b840a4f4bdcadfe755c966f1ee583f506cad0f;p=thirdparty%2Fsqlite.git In the TreeView logic (used for debugging only) do not show unnecessary fields of the Window object when a function has a FILTER. FossilOrigin-Name: d2c6b82c346dbf39e07f09d187e4a8216a56caa7df3dcfafc82e32f676a1db8a --- diff --git a/manifest b/manifest index 759ee440f6..2ec42087c4 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\san\sfts3\sproblem\scaused\sby\sreducing\sthe\spage\ssize\susing\sthe\sundocumented\s"nodesize"\soption,\sthen\srunning\san\sincremental-merge. -D 2023-10-19T18:23:17.869 +C In\sthe\sTreeView\slogic\s(used\sfor\sdebugging\sonly)\sdo\snot\sshow\sunnecessary\sfields\nof\sthe\sWindow\sobject\swhen\sa\sfunction\shas\sa\sFILTER. +D 2023-10-19T19:08:33.080 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -781,7 +781,7 @@ F src/test_window.c cdae419fdcea5bad6dcd9368c685abdad6deb59e9fc8b84b153de513d394 F src/test_wsd.c 41cadfd9d97fe8e3e4e44f61a4a8ccd6f7ca8fe9 F src/threads.c 4ae07fa022a3dc7c5beb373cf744a85d3c5c6c3c F src/tokenize.c 23d9f4539880b40226254ad9072f4ecf12eb1902e62aea47aac29928afafcfd5 -F src/treeview.c 6c441500139d46c147216dac667510987ecd0e91a27735cd6d9dd77f81e465a7 +F src/treeview.c bd8ec60f37e3c5d133e00dbff6ba44bb7e3a102728bab83ec420b3feb7d04440 F src/trigger.c 5286019b152f622a38900284109e4aae1e5f566deb7ad9ba7e931f0660771f32 F src/update.c 6904814dd62a7a93bbb86d9f1419c7f134a9119582645854ab02b36b676d9f92 F src/upsert.c fa125a8d3410ce9a97b02cb50f7ae68a2476c405c76aa692d3acf6b8586e9242 @@ -2133,8 +2133,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P d5ae82ec52eafed5e3dc8c9d99685f6523fce7d973ef7e8d9d75ed9b8912426a -R 02c4f3ff3085bada857f44e872f54862 -U dan -Z ffd740135c1cbc63e13e90b6f1ec66d6 +P 2875dcb1ac86db2704ad377d719f308c8837e196b49c98b20ceda1324f2d27ea +R 45852c93d35e0d900ce3d50d808ec604 +U drh +Z 4a6691c4f5ab92ae34d088813bdd99dd # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 33933915c4..95865b7d32 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -2875dcb1ac86db2704ad377d719f308c8837e196b49c98b20ceda1324f2d27ea \ No newline at end of file +d2c6b82c346dbf39e07f09d187e4a8216a56caa7df3dcfafc82e32f676a1db8a \ No newline at end of file diff --git a/src/treeview.c b/src/treeview.c index 6852a61ddd..a3f128cab2 100644 --- a/src/treeview.c +++ b/src/treeview.c @@ -412,6 +412,7 @@ void sqlite3TreeViewWindow(TreeView *pView, const Window *pWin, u8 more){ sqlite3TreeViewItem(pView, "FILTER", 1); sqlite3TreeViewExpr(pView, pWin->pFilter, 0); sqlite3TreeViewPop(&pView); + if( pWin->eFrmType==TK_FILTER ) return; } sqlite3TreeViewPush(&pView, more); if( pWin->zName ){ @@ -421,7 +422,7 @@ void sqlite3TreeViewWindow(TreeView *pView, const Window *pWin, u8 more){ } if( pWin->zBase ) nElement++; if( pWin->pOrderBy ) nElement++; - if( pWin->eFrmType ) nElement++; + if( pWin->eFrmType!=0 && pWin->eFrmType!=TK_FILTER ) nElement++; if( pWin->eExclude ) nElement++; if( pWin->zBase ){ sqlite3TreeViewPush(&pView, (--nElement)>0); @@ -434,7 +435,7 @@ void sqlite3TreeViewWindow(TreeView *pView, const Window *pWin, u8 more){ if( pWin->pOrderBy ){ sqlite3TreeViewExprList(pView, pWin->pOrderBy, (--nElement)>0, "ORDER-BY"); } - if( pWin->eFrmType ){ + if( pWin->eFrmType!=0 && pWin->eFrmType!=TK_FILTER ){ char zBuf[30]; const char *zFrmType = "ROWS"; if( pWin->eFrmType==TK_RANGE ) zFrmType = "RANGE"; @@ -682,7 +683,7 @@ void sqlite3TreeViewExpr(TreeView *pView, const Expr *pExpr, u8 moreToFollow){ assert( ExprUseXList(pExpr) ); pFarg = pExpr->x.pList; #ifndef SQLITE_OMIT_WINDOWFUNC - pWin = ExprHasProperty(pExpr, EP_WinFunc) ? pExpr->y.pWin : 0; + pWin = IsWindowFunc(pExpr) ? pExpr->y.pWin : 0; #else pWin = 0; #endif @@ -708,7 +709,7 @@ void sqlite3TreeViewExpr(TreeView *pView, const Expr *pExpr, u8 moreToFollow){ sqlite3TreeViewLine(pView, "FUNCTION %Q%s", pExpr->u.zToken, zFlgs); } if( pFarg ){ - sqlite3TreeViewExprList(pView, pFarg, pWin!=0, 0); + sqlite3TreeViewExprList(pView, pFarg, pWin!=0 || pExpr->pLeft, 0); if( pExpr->pLeft ){ Expr *pOB = pExpr->pLeft; assert( pOB->op==TK_ORDER );