/ Check-in [a6499c25]
Login

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

Overview
Comment:Fix an issue with the SQLITE_TESTCTRL_EXPLAIN_STMT and compound queries with multiple terms.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a6499c2521637931661ed4d3afc4f96f91c69785
User & Date: drh 2013-01-28 22:52:34
Context
2013-01-29
19:14
New debugging pragmas: PRAGMA vdbe_debug=ON is short-hand for the sql_trace, vdbe_listing, and vdbe_trace pragmas. PRAGMA vdbe_debug enables tracing of sqlite3VdbeAddOp() calls. None of this is active unless compiled with SQLITE_DEBUG. check-in: ae565ff3 user: drh tags: trunk
2013-01-28
22:52
Fix an issue with the SQLITE_TESTCTRL_EXPLAIN_STMT and compound queries with multiple terms. check-in: a6499c25 user: drh tags: trunk
19:00
Issue an error message and quit (rather than overflowing a reference counter) if the number of references to a table exceeds the maximum due to nested UNION views. Fix for ticket [d58ccbb3f1]. check-in: c2462a95 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/select.c.

  4742   4742     }
  4743   4743   }
  4744   4744   void sqlite3ExplainSelect(Vdbe *pVdbe, Select *p){
  4745   4745     if( p==0 ){
  4746   4746       sqlite3ExplainPrintf(pVdbe, "(null-select)");
  4747   4747       return;
  4748   4748     }
  4749         -  while( p->pPrior ) p = p->pPrior;
         4749  +  while( p->pPrior ){
         4750  +    p->pPrior->pNext = p;
         4751  +    p = p->pPrior;
         4752  +  }
  4750   4753     sqlite3ExplainPush(pVdbe);
  4751   4754     while( p ){
  4752   4755       explainOneSelect(pVdbe, p);
  4753   4756       p = p->pNext;
  4754   4757       if( p==0 ) break;
  4755   4758       sqlite3ExplainNL(pVdbe);
  4756   4759       sqlite3ExplainPrintf(pVdbe, "%s\n", selectOpName(p->op));