1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

Fix a register allocation bug in the VDBE code generator for

PRAGMA integrity_check;

FossilOrigin-Name: 88439a866b3b16ad7c308ebe59198662a05e7eeb
This commit is contained in:
drh
2016-03-19 00:35:02 +00:00
parent 860443da10
commit bb9b5f2608
5 changed files with 42 additions and 12 deletions

View File

@@ -4251,3 +4251,26 @@ void sqlite3ClearTempRegCache(Parse *pParse){
pParse->nTempReg = 0;
pParse->nRangeReg = 0;
}
/*
** Validate that no temporary register falls within the range of
** iFirst..iLast, inclusive. This routine is only call from within assert()
** statements.
*/
#ifdef SQLITE_DEBUG
int sqlite3NoTempsInRange(Parse *pParse, int iFirst, int iLast){
int i;
if( pParse->nRangeReg>0
&& pParse->iRangeReg+pParse->nRangeReg<iLast
&& pParse->iRangeReg>=iFirst
){
return 0;
}
for(i=0; i<pParse->nTempReg; i++){
if( pParse->aTempReg[i]>=iFirst && pParse->aTempReg[i]<=iLast ){
return 0;
}
}
return 1;
}
#endif /* SQLITE_DEBUG */