SQLite
Check-in [a6499c2521]
Not logged in
Overview
SHA1 Hash:a6499c2521637931661ed4d3afc4f96f91c69785
Date: 2013-01-28 22:52:34
User: drh
Comment:Fix an issue with the SQLITE_TESTCTRL_EXPLAIN_STMT and compound queries with multiple terms.
Tags And Properties
Changes
hide diffs unified diffs patch

Changes to src/select.c

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