/ Check-in [5159cb8f]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Enhance the sqlite3TreeView() display for Expr objects so that it shows the iRightJoinTable value for Expr nodes that have the EP_FromJoin property.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:5159cb8f2bcfb1f7114786ba23082d2b91a26e3a7ddfae75f8bd362792949d5e
User & Date: drh 2017-04-14 14:02:14
Context
2017-04-14
14:50
Make USE_FULLWARN=1 the default for MSVC and fix harmless compiler warnings. check-in: 6bf67376 user: mistachkin tags: trunk
14:02
Enhance the sqlite3TreeView() display for Expr objects so that it shows the iRightJoinTable value for Expr nodes that have the EP_FromJoin property. check-in: 5159cb8f user: drh tags: trunk
12:39
Simplify the interface to the subst() routines that are part of the query flattener by collecting common parameters into the SubstContext object and passing around a pointer to that object. check-in: e651074b user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/treeview.c.

   234    234   
   235    235   /*
   236    236   ** Generate a human-readable explanation of an expression tree.
   237    237   */
   238    238   void sqlite3TreeViewExpr(TreeView *pView, const Expr *pExpr, u8 moreToFollow){
   239    239     const char *zBinOp = 0;   /* Binary operator */
   240    240     const char *zUniOp = 0;   /* Unary operator */
   241         -  char zFlgs[30];
          241  +  char zFlgs[60];
   242    242     pView = sqlite3TreeViewPush(pView, moreToFollow);
   243    243     if( pExpr==0 ){
   244    244       sqlite3TreeViewLine(pView, "nil");
   245    245       sqlite3TreeViewPop(pView);
   246    246       return;
   247    247     }
   248    248     if( pExpr->flags ){
   249         -    sqlite3_snprintf(sizeof(zFlgs),zFlgs,"  flags=0x%x",pExpr->flags);
          249  +    if( ExprHasProperty(pExpr, EP_FromJoin) ){
          250  +      sqlite3_snprintf(sizeof(zFlgs),zFlgs,"  flags=0x%x iRJT=%d",
          251  +                       pExpr->flags, pExpr->iRightJoinTable);
          252  +    }else{
          253  +      sqlite3_snprintf(sizeof(zFlgs),zFlgs,"  flags=0x%x",pExpr->flags);
          254  +    }
   250    255     }else{
   251    256       zFlgs[0] = 0;
   252    257     }
   253    258     switch( pExpr->op ){
   254    259       case TK_AGG_COLUMN: {
   255    260         sqlite3TreeViewLine(pView, "AGG{%d:%d}%s",
   256    261               pExpr->iTable, pExpr->iColumn, zFlgs);