mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-18 10:21:03 +03:00
Fix a database corruption bug caused by the ONEPASS optimization added
in check-in [8b93cc5937000535]. Bug detected (prior to release) by [https://www.sqlite.org/sqllogictest|sqllogictest]. Test cases to follow. FossilOrigin-Name: 9d057f52217e7ef9c3f3eb84117abe3365503f44
This commit is contained in:
@@ -4529,7 +4529,10 @@ void sqlite3WhereEnd(WhereInfo *pWInfo){
|
||||
}else if( pLoop->wsFlags & WHERE_MULTI_OR ){
|
||||
pIdx = pLevel->u.pCovidx;
|
||||
}
|
||||
if( pIdx && !db->mallocFailed ){
|
||||
if( pIdx
|
||||
&& (pWInfo->eOnePass==ONEPASS_OFF || !HasRowid(pIdx->pTable))
|
||||
&& !db->mallocFailed
|
||||
){
|
||||
last = sqlite3VdbeCurrentAddr(v);
|
||||
k = pLevel->addrBody;
|
||||
pOp = sqlite3VdbeGetOp(v, k);
|
||||
|
||||
Reference in New Issue
Block a user