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

Remove NEVER() on branches formerly thought to unreachable

(see check-in [71272caff5874137]) in order to fix the first bug reported
by [forum:/forumpost/28821db852|forum post 28821db852].

FossilOrigin-Name: bd6811d8110d5f00596e2eff6d4b02af8b6d8557d41990e6f50518ead0fa01fb
This commit is contained in:
drh
2022-04-25 10:43:19 +00:00
parent ecb386b71f
commit 1a6bac0d2f
3 changed files with 9 additions and 13 deletions

View File

@@ -172,9 +172,7 @@ void sqlite3FinishCoding(Parse *pParse){
int i;
int reg;
if( NEVER(pReturning->nRetCol==0) ){
assert( CORRUPT_DB );
}else{
if( pReturning->nRetCol ){
sqlite3VdbeAddOp0(v, OP_FkCheck);
addrRewind =
sqlite3VdbeAddOp1(v, OP_Rewind, pReturning->iRetCur);
@@ -270,9 +268,7 @@ void sqlite3FinishCoding(Parse *pParse){
if( pParse->bReturning ){
Returning *pRet = pParse->u1.pReturning;
if( NEVER(pRet->nRetCol==0) ){
assert( CORRUPT_DB );
}else{
if( pRet->nRetCol ){
sqlite3VdbeAddOp2(v, OP_OpenEphemeral, pRet->iRetCur, pRet->nRetCol);
}
}