Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | More compact notation for the parse-tree view. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | tree-explain |
Files: | files | file ages | folders |
SHA1: |
0eb3f8b1e3a196811fb54a5e2645debe |
User & Date: | drh 2011-12-07 15:33:14.109 |
Context
2011-12-07
| ||
22:49 | Additional detail added to the tree-explain output for SELECT statements. (check-in: 7b457ea455 user: drh tags: tree-explain) | |
15:33 | More compact notation for the parse-tree view. (check-in: 0eb3f8b1e3 user: drh tags: tree-explain) | |
01:47 | Bug fix in sqlite3SelectDup(). Make sure the pNext pointer is valid. (check-in: 7e5b56b1c6 user: drh tags: tree-explain) | |
Changes
Changes to src/expr.c.
︙ | ︙ | |||
2952 2953 2954 2955 2956 2957 2958 | if( pExpr==0 ){ op = TK_NULL; }else{ op = pExpr->op; } switch( op ){ case TK_AGG_COLUMN: { | | | | | | | | | < < < < < < < < | | 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 | if( pExpr==0 ){ op = TK_NULL; }else{ op = pExpr->op; } switch( op ){ case TK_AGG_COLUMN: { sqlite3ExplainPrintf(pOut, "AGG{%d:%d}", pExpr->iTable, pExpr->iColumn); break; } case TK_COLUMN: { if( pExpr->iTable<0 ){ /* This only happens when coding check constraints */ sqlite3ExplainPrintf(pOut, "COLUMN(%d)", pExpr->iColumn); }else{ sqlite3ExplainPrintf(pOut, "{%d:%d}", pExpr->iTable, pExpr->iColumn); } break; } case TK_INTEGER: { if( pExpr->flags & EP_IntValue ){ sqlite3ExplainPrintf(pOut, "%d", pExpr->u.iValue); }else{ sqlite3ExplainPrintf(pOut, "%s", pExpr->u.zToken); } break; } #ifndef SQLITE_OMIT_FLOATING_POINT case TK_FLOAT: { sqlite3ExplainPrintf(pOut,"%s", pExpr->u.zToken); break; } #endif case TK_STRING: { sqlite3ExplainPrintf(pOut,"%Q", pExpr->u.zToken); break; } case TK_NULL: { sqlite3ExplainPrintf(pOut,"NULL"); break; } #ifndef SQLITE_OMIT_BLOB_LITERAL case TK_BLOB: { sqlite3ExplainPrintf(pOut,"%s", pExpr->u.zToken); break; } #endif case TK_VARIABLE: { sqlite3ExplainPrintf(pOut,"VARIABLE(%s,%d)", pExpr->u.zToken, pExpr->iColumn); break; |
︙ | ︙ |
Changes to src/select.c.
︙ | ︙ | |||
4504 4505 4506 4507 4508 4509 4510 | sqlite3ExplainNL(pVdbe); if( p->pSrc && p->pSrc->nSrc ){ int i; sqlite3ExplainPrintf(pVdbe, "FROM "); sqlite3ExplainPush(pVdbe); for(i=0; i<p->pSrc->nSrc; i++){ struct SrcList_item *pItem = &p->pSrc->a[i]; | | > > > | | < < < < | 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 | sqlite3ExplainNL(pVdbe); if( p->pSrc && p->pSrc->nSrc ){ int i; sqlite3ExplainPrintf(pVdbe, "FROM "); sqlite3ExplainPush(pVdbe); for(i=0; i<p->pSrc->nSrc; i++){ struct SrcList_item *pItem = &p->pSrc->a[i]; sqlite3ExplainPrintf(pVdbe, "{%d,*} = ", pItem->iCursor); if( pItem->pSelect ){ sqlite3ExplainSelect(pVdbe, pItem->pSelect); if( pItem->pTab ){ sqlite3ExplainPrintf(pVdbe, " (tabname=%s)", pItem->pTab->zName); } }else if( pItem->zName ){ sqlite3ExplainPrintf(pVdbe, "%s", pItem->zName); } if( pItem->zAlias ){ sqlite3ExplainPrintf(pVdbe, " (AS %s)", pItem->zAlias); } if( pItem->jointype & JT_LEFT ){ sqlite3ExplainPrintf(pVdbe, " LEFT-JOIN"); } sqlite3ExplainNL(pVdbe); } sqlite3ExplainPop(pVdbe); } if( p->pWhere ){ sqlite3ExplainPrintf(pVdbe, "WHERE "); sqlite3ExplainExpr(pVdbe, p->pWhere); |
︙ | ︙ |