1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-21 09:00:59 +03:00

A pair of sqlite3_analyzer bug fixes: (1) quote strings in the SQL at the end

of the output. (2) Fix test_stat.c so that it no longer misses some overflow
pages on internal index pages.

FossilOrigin-Name: 42a11e7464ab1d97d603c7409f10710ad4f1f542
This commit is contained in:
drh
2013-11-02 11:34:58 +00:00
parent f52a4690b0
commit a46417151a
5 changed files with 42 additions and 31 deletions

View File

@@ -397,6 +397,7 @@ static int statNext(sqlite3_vtab_cursor *pCursor){
sqlite3_free(pCsr->zPath);
pCsr->zPath = 0;
statNextRestart:
if( pCsr->aPage[0].pPg==0 ){
rc = sqlite3_step(pCsr->pStmt);
if( rc==SQLITE_ROW ){
@@ -448,11 +449,11 @@ static int statNext(sqlite3_vtab_cursor *pCursor){
p->iCell++;
}
while( !p->iRightChildPg || p->iCell>p->nCell ){
if( !p->iRightChildPg || p->iCell>p->nCell ){
statClearPage(p);
if( pCsr->iPage==0 ) return statNext(pCursor);
pCsr->iPage--;
p = &pCsr->aPage[pCsr->iPage];
goto statNextRestart; /* Tail recursion */
}
pCsr->iPage++;
assert( p==&pCsr->aPage[pCsr->iPage-1] );