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

Do not reuse temp registers originally allocated to a subroutine within

the main body of the program logic, since if the subroutine is called
while the reused temp registers are in use, their values will get clobbered.
Candidate fix for ticket [3a77c9714e63330]

FossilOrigin-Name: 092d53315e50be42b51ef7b3069c82c32a129b6a
This commit is contained in:
drh
2011-12-06 13:24:59 +00:00
parent 5833089707
commit cdc6955716
5 changed files with 19 additions and 10 deletions

View File

@@ -3762,3 +3762,11 @@ void sqlite3ReleaseTempRange(Parse *pParse, int iReg, int nReg){
pParse->iRangeReg = iReg;
}
}
/*
** Mark all temporary registers as being unavailable for reuse.
*/
void sqlite3ClearTempRegCache(Parse *pParse){
pParse->nTempReg = 0;
pParse->nRangeReg = 0;
}