1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Enhance the TreeView debugging output for Expr with opcode TK_IN so as to

show the RHS table and the subroutine address.

FossilOrigin-Name: aec1e4cd59ae874b66335e4f87322fbe31fbb752429e68bf41338db316d0a9ed
This commit is contained in:
drh
2022-04-30 00:05:37 +00:00
parent 3d5665366f
commit c64f0e71c1
3 changed files with 18 additions and 8 deletions

View File

@@ -712,7 +712,17 @@ void sqlite3TreeViewExpr(TreeView *pView, const Expr *pExpr, u8 moreToFollow){
break;
}
case TK_IN: {
sqlite3TreeViewLine(pView, "IN flags=0x%x", pExpr->flags);
sqlite3_str *pStr = sqlite3_str_new(0);
char *z;
sqlite3_str_appendf(pStr, "IN flags=0x%x", pExpr->flags);
if( pExpr->iTable ) sqlite3_str_appendf(pStr, " iTable=%d",pExpr->iTable);
if( ExprHasProperty(pExpr, EP_Subrtn) ){
sqlite3_str_appendf(pStr, " subrtn(%d,%d)",
pExpr->y.sub.regReturn, pExpr->y.sub.iAddr);
}
z = sqlite3_str_finish(pStr);
sqlite3TreeViewLine(pView, z);
sqlite3_free(z);
sqlite3TreeViewExpr(pView, pExpr->pLeft, 1);
if( ExprUseXSelect(pExpr) ){
sqlite3TreeViewSelect(pView, pExpr->x.pSelect, 0);