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

Prevent a warning about integer overflow when using a very large negative

LIMIT.

FossilOrigin-Name: 96106d5620eae51474234f4eec1d2c5bd570d486
This commit is contained in:
drh
2016-11-30 01:05:41 +00:00
parent d76a902c87
commit 64777ba834
3 changed files with 14 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
C Further\schanges\sto\sthe\sdate/time\sfunctions\sto\ssuppress\sharmless\ssigned\ninteger\soverflow\swarnings\sthat\scould\shave\soccurred\swhen\sdoing\sout-of-range\ndate\scalculations\swhich,\saccording\sto\sthe\sdocs,\sgive\sundefined\sresults. C Prevent\sa\swarning\sabout\sinteger\soverflow\swhen\susing\sa\svery\slarge\snegative\nLIMIT.
D 2016-11-30T00:48:28.495 D 2016-11-30T01:05:41.141
F Makefile.in 6b572807415d3f0a379cebc9461416d8df4a12c8 F Makefile.in 6b572807415d3f0a379cebc9461416d8df4a12c8
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc bb4d970894abbbe0e88d00aac29bd52af8bc95f4 F Makefile.msc bb4d970894abbbe0e88d00aac29bd52af8bc95f4
@@ -454,7 +454,7 @@ F src/update.c 1b8321100cac004f0721ab67b16909dd006e663c
F src/utf.c 699001c79f28e48e9bcdf8a463da029ea660540c F src/utf.c 699001c79f28e48e9bcdf8a463da029ea660540c
F src/util.c 3e2da6101888d073e79ecc6af5e0a2f70fa1e498 F src/util.c 3e2da6101888d073e79ecc6af5e0a2f70fa1e498
F src/vacuum.c 33c174b28886b2faf26e503b5a49a1c01a9b1c16 F src/vacuum.c 33c174b28886b2faf26e503b5a49a1c01a9b1c16
F src/vdbe.c 4a3ff567745aac67ffbb55d06fbecf19f88d12be F src/vdbe.c 1802a10926b14de7065950d436e7ce418682faef
F src/vdbe.h c044be7050ac6bf596eecc6ab159f5dbc020a3b7 F src/vdbe.h c044be7050ac6bf596eecc6ab159f5dbc020a3b7
F src/vdbeInt.h 9b498d3cb52dc2efb53571fb8ae8e14cf298ce84 F src/vdbeInt.h 9b498d3cb52dc2efb53571fb8ae8e14cf298ce84
F src/vdbeapi.c ea4e2dc2213cc6bd7bee375a29a9b51c31b93ae0 F src/vdbeapi.c ea4e2dc2213cc6bd7bee375a29a9b51c31b93ae0
@@ -1535,7 +1535,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P d410a839752153c6d8be08f758abfbc16475745a P dc453b3403450b1d8cc53daf0721fed025b9053c
R 4de84d6de9c4735ca2171beb11da6949 R dc777d9d449bf1af0c4185b27e450723
U drh U drh
Z a5d0c3a9dbd00d301630dafcf90b9504 Z 787a300f5849727b901aee7620134dd8

View File

@@ -1 +1 @@
dc453b3403450b1d8cc53daf0721fed025b9053c 96106d5620eae51474234f4eec1d2c5bd570d486

View File

@@ -6022,15 +6022,17 @@ case OP_IfNotZero: { /* jump, in1 */
/* Opcode: DecrJumpZero P1 P2 * * * /* Opcode: DecrJumpZero P1 P2 * * *
** Synopsis: if (--r[P1])==0 goto P2 ** Synopsis: if (--r[P1])==0 goto P2
** **
** Register P1 must hold an integer. Decrement the value in register P1 ** Register P1 must hold an integer. If the value in P1 is positive,
** then jump to P2 if the new value is exactly zero. ** decrement the value and jump to P2 if the new value is exactly zero.
*/ */
case OP_DecrJumpZero: { /* jump, in1 */ case OP_DecrJumpZero: { /* jump, in1 */
pIn1 = &aMem[pOp->p1]; pIn1 = &aMem[pOp->p1];
assert( pIn1->flags&MEM_Int ); assert( pIn1->flags&MEM_Int );
if( pIn1->u.i>0 ){
pIn1->u.i--; pIn1->u.i--;
VdbeBranchTaken(pIn1->u.i==0, 2); VdbeBranchTaken(pIn1->u.i==0, 2);
if( pIn1->u.i==0 ) goto jump_to_p2; if( pIn1->u.i==0 ) goto jump_to_p2;
}
break; break;
} }