1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-16 23:02:26 +03:00

Fix an assert() statement in the covering index optimization for the corner

case of dealing with an sqlite_offset() SQL function call.

FossilOrigin-Name: 3950b7d006add571579158c751247a9435801e53eafd84b43dd3046e01da8ee6
This commit is contained in:
drh
2022-03-14 22:58:04 +00:00
parent 1a25be1a9a
commit d024eca323
4 changed files with 20 additions and 8 deletions

View File

@@ -6165,6 +6165,9 @@ void sqlite3WhereEnd(WhereInfo *pWInfo){
OpcodeRewriteTrace(db, k, pOp);
}
assert( (pLoop->wsFlags & WHERE_IDX_ONLY)==0 || x>=0
#ifdef SQLITE_ENABLE_OFFSET_SQL_FUNC
|| pOp->opcode==OP_Offset
#endif
|| pWInfo->eOnePass );
}else if( pOp->opcode==OP_Rowid ){
pOp->p1 = pLevel->iIdxCur;