/ Check-in [157347e2]
Login

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

Overview
Comment:Display VECTOR expressions in .wheretrace and .selecttrace debugging output.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | rowvalue
Files: files | file ages | folders
SHA1: 157347e2580e5078c4081d602e9d1a82d194e719
User & Date: drh 2016-08-18 17:55:57
Context
2016-08-18
18:09
Display SELECT_COLUMN expressions in the .wheretrace debugging output. check-in: 3b27a5da user: drh tags: rowvalue
17:55
Display VECTOR expressions in .wheretrace and .selecttrace debugging output. check-in: 157347e2 user: drh tags: rowvalue
15:36
Since the TK_VECTOR token is not actually used by the parser, make it an extra token code added by the tool/addopcodes.tcl script during parser build. check-in: b40b202c user: drh tags: rowvalue
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/sqliteInt.h.

  3509   3509   #endif
  3510   3510   #if defined(SQLITE_TEST)
  3511   3511     void *sqlite3TestTextToPtr(const char*);
  3512   3512   #endif
  3513   3513   
  3514   3514   #if defined(SQLITE_DEBUG)
  3515   3515     void sqlite3TreeViewExpr(TreeView*, const Expr*, u8);
         3516  +  void sqlite3TreeViewBareExprList(TreeView*, const ExprList*, const char*);
  3516   3517     void sqlite3TreeViewExprList(TreeView*, const ExprList*, u8, const char*);
  3517   3518     void sqlite3TreeViewSelect(TreeView*, const Select*, u8);
  3518   3519     void sqlite3TreeViewWith(TreeView*, const With*, u8);
  3519   3520   #endif
  3520   3521   
  3521   3522   
  3522   3523   void sqlite3SetString(char **, sqlite3*, const char*);

Changes to src/treeview.c.

   446    446       }
   447    447   #endif
   448    448       case TK_MATCH: {
   449    449         sqlite3TreeViewLine(pView, "MATCH {%d:%d}%s",
   450    450                             pExpr->iTable, pExpr->iColumn, zFlgs);
   451    451         sqlite3TreeViewExpr(pView, pExpr->pRight, 0);
   452    452         break;
          453  +    }
          454  +    case TK_VECTOR: {
          455  +      sqlite3TreeViewBareExprList(pView, pExpr->x.pList, "VECTOR");
          456  +      break;
   453    457       }
   454    458       default: {
   455    459         sqlite3TreeViewLine(pView, "op=%d", pExpr->op);
   456    460         break;
   457    461       }
   458    462     }
   459    463     if( zBinOp ){
................................................................................
   462    466       sqlite3TreeViewExpr(pView, pExpr->pRight, 0);
   463    467     }else if( zUniOp ){
   464    468       sqlite3TreeViewLine(pView, "%s%s", zUniOp, zFlgs);
   465    469       sqlite3TreeViewExpr(pView, pExpr->pLeft, 0);
   466    470     }
   467    471     sqlite3TreeViewPop(pView);
   468    472   }
          473  +
   469    474   
   470    475   /*
   471    476   ** Generate a human-readable explanation of an expression list.
   472    477   */
   473         -void sqlite3TreeViewExprList(
          478  +void sqlite3TreeViewBareExprList(
   474    479     TreeView *pView,
   475    480     const ExprList *pList,
   476         -  u8 moreToFollow,
   477    481     const char *zLabel
   478    482   ){
   479         -  int i;
   480         -  pView = sqlite3TreeViewPush(pView, moreToFollow);
   481    483     if( zLabel==0 || zLabel[0]==0 ) zLabel = "LIST";
   482    484     if( pList==0 ){
   483    485       sqlite3TreeViewLine(pView, "%s (empty)", zLabel);
   484    486     }else{
          487  +    int i;
   485    488       sqlite3TreeViewLine(pView, "%s", zLabel);
   486    489       for(i=0; i<pList->nExpr; i++){
   487    490         int j = pList->a[i].u.x.iOrderByCol;
   488    491         if( j ){
   489    492           sqlite3TreeViewPush(pView, 0);
   490    493           sqlite3TreeViewLine(pView, "iOrderByCol=%d", j);
   491    494         }
   492    495         sqlite3TreeViewExpr(pView, pList->a[i].pExpr, i<pList->nExpr-1);
   493    496         if( j ) sqlite3TreeViewPop(pView);
   494    497       }
   495    498     }
          499  +}
          500  +void sqlite3TreeViewExprList(
          501  +  TreeView *pView,
          502  +  const ExprList *pList,
          503  +  u8 moreToFollow,
          504  +  const char *zLabel
          505  +){
          506  +  pView = sqlite3TreeViewPush(pView, moreToFollow);
          507  +  sqlite3TreeViewBareExprList(pView, pList, zLabel);
   496    508     sqlite3TreeViewPop(pView);
   497    509   }
   498    510   
   499    511   #endif /* SQLITE_DEBUG */