summaryrefslogtreecommitdiffstats
path: root/src/vdbeaux.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 05:16:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 05:16:48 +0000
commit3640b21e686fef7e3f25dc775112c7d4be43f197 (patch)
treee7fec2ad45891adeada1227d655062cbd201dd5a /src/vdbeaux.c
parentReleasing progress-linux version 3.45.3-1~progress7.99u1. (diff)
downloadsqlite3-3640b21e686fef7e3f25dc775112c7d4be43f197.tar.xz
sqlite3-3640b21e686fef7e3f25dc775112c7d4be43f197.zip
Merging upstream version 3.46.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/vdbeaux.c')
-rw-r--r--src/vdbeaux.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/vdbeaux.c b/src/vdbeaux.c
index fe0dbd6..e4c174e 100644
--- a/src/vdbeaux.c
+++ b/src/vdbeaux.c
@@ -939,6 +939,15 @@ static void resolveP2Values(Vdbe *p, int *pMaxFuncArgs){
assert( aLabel!=0 ); /* True because of tag-20230419-1 */
pOp->p2 = aLabel[ADDR(pOp->p2)];
}
+
+ /* OPFLG_JUMP opcodes never have P2==0, though OPFLG_JUMP0 opcodes
+ ** might */
+ assert( pOp->p2>0
+ || (sqlite3OpcodeProperty[pOp->opcode] & OPFLG_JUMP0)!=0 );
+
+ /* Jumps never go off the end of the bytecode array */
+ assert( pOp->p2<p->nOp
+ || (sqlite3OpcodeProperty[pOp->opcode] & OPFLG_JUMP)==0 );
break;
}
}
@@ -3346,9 +3355,9 @@ int sqlite3VdbeHalt(Vdbe *p){
/* Check for immediate foreign key violations. */
if( p->rc==SQLITE_OK || (p->errorAction==OE_Fail && !isSpecialError) ){
- sqlite3VdbeCheckFk(p, 0);
+ (void)sqlite3VdbeCheckFk(p, 0);
}
-
+
/* If the auto-commit flag is set and this is the only active writer
** VM, then we do either a commit or rollback of the current transaction.
**
@@ -4516,17 +4525,15 @@ int sqlite3IntFloatCompare(i64 i, double r){
return (x<r) ? -1 : (x>r);
}else{
i64 y;
- double s;
if( r<-9223372036854775808.0 ) return +1;
if( r>=9223372036854775808.0 ) return -1;
y = (i64)r;
if( i<y ) return -1;
if( i>y ) return +1;
- s = (double)i;
- testcase( doubleLt(s,r) );
- testcase( doubleLt(r,s) );
- testcase( doubleEq(r,s) );
- return (s<r) ? -1 : (s>r);
+ testcase( doubleLt(((double)i),r) );
+ testcase( doubleLt(r,((double)i)) );
+ testcase( doubleEq(r,((double)i)) );
+ return (((double)i)<r) ? -1 : (((double)i)>r);
}
}