mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-16 23:02:26 +03:00
Initialize variables differently in the range processing logic of where.c
in order to make sure variables are always initialized even following an OOM error. FossilOrigin-Name: 3fb3686a4502140720dc3710a28a4f4128ab6554
This commit is contained in:
18
manifest
18
manifest
@@ -1,8 +1,8 @@
|
|||||||
-----BEGIN PGP SIGNED MESSAGE-----
|
-----BEGIN PGP SIGNED MESSAGE-----
|
||||||
Hash: SHA1
|
Hash: SHA1
|
||||||
|
|
||||||
C Attempt\sto\sclarify\sthe\smeaning\sof\sa\s"parameter"\sin\sthe\ssqlite3_bind()\sAPI\ndocumentation.
|
C Initialize\svariables\sdifferently\sin\sthe\srange\sprocessing\slogic\sof\swhere.c\nin\sorder\sto\smake\ssure\svariables\sare\salways\sinitialized\seven\sfollowing\nan\sOOM\serror.
|
||||||
D 2009-08-25T14:59:37
|
D 2009-08-25T15:56:51
|
||||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||||
F Makefile.in 73ddeec9dd10b85876c5c2ce1fdce627e1dcc7f8
|
F Makefile.in 73ddeec9dd10b85876c5c2ce1fdce627e1dcc7f8
|
||||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||||
@@ -216,7 +216,7 @@ F src/vdbeblob.c a3f3e0e877fc64ea50165eec2855f5ada4477611
|
|||||||
F src/vdbemem.c c4a5188ff43692f2ca78d3539ad4877e14b70712
|
F src/vdbemem.c c4a5188ff43692f2ca78d3539ad4877e14b70712
|
||||||
F src/vtab.c aedd76e8670d5a5379f93804398d3ba960125547
|
F src/vtab.c aedd76e8670d5a5379f93804398d3ba960125547
|
||||||
F src/walker.c 1edca756275f158b80f20eb6f104c8d3fcc96a04
|
F src/walker.c 1edca756275f158b80f20eb6f104c8d3fcc96a04
|
||||||
F src/where.c b9ad2d2db4a7d1cda7bed8a7299eb73fde63b5b1
|
F src/where.c fc8b33fb469d30c2d933188757ed4d71a775b08a
|
||||||
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
|
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
|
||||||
F test/alias.test 4529fbc152f190268a15f9384a5651bbbabc9d87
|
F test/alias.test 4529fbc152f190268a15f9384a5651bbbabc9d87
|
||||||
F test/all.test 14165b3e32715b700b5f0cbf8f6e3833dda0be45
|
F test/all.test 14165b3e32715b700b5f0cbf8f6e3833dda0be45
|
||||||
@@ -750,14 +750,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
|||||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||||
F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
|
F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
|
||||||
P 6a623e6cf0370456232497a84366d18fa180debb
|
P 9389e6a7dad7ba70923282d6fe45fbccd22f681e
|
||||||
R fcbb968e51afd78ed3c075342c97e2d1
|
R ba5f45894b6fc316b385ccdbc215e894
|
||||||
U drh
|
U drh
|
||||||
Z f375ffcba1ac2c7cffa691451e61067e
|
Z 903cfcbc615b7cc03024df17088e7120
|
||||||
-----BEGIN PGP SIGNATURE-----
|
-----BEGIN PGP SIGNATURE-----
|
||||||
Version: GnuPG v1.4.6 (GNU/Linux)
|
Version: GnuPG v1.4.6 (GNU/Linux)
|
||||||
|
|
||||||
iD8DBQFKk/xjoxKgR168RlERAsnbAJ4wPmuxVLQB8GdAW14JVlkINUJ5QwCfYUBz
|
iD8DBQFKlAnGoxKgR168RlERAsoLAJ4nH/YFuFnXcU6+a92QUZwF2QQ4ZACeLbl5
|
||||||
gzYdveWl3zj0kWAvApoKFIs=
|
hSBe5ozIRkuFFcem6hDzev0=
|
||||||
=Gtjj
|
=C0Ud
|
||||||
-----END PGP SIGNATURE-----
|
-----END PGP SIGNATURE-----
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
9389e6a7dad7ba70923282d6fe45fbccd22f681e
|
3fb3686a4502140720dc3710a28a4f4128ab6554
|
||||||
11
src/where.c
11
src/where.c
@@ -2038,8 +2038,8 @@ static int whereRangeScanEst(
|
|||||||
|
|
||||||
if( nEq==0 && p->aSample ){
|
if( nEq==0 && p->aSample ){
|
||||||
int iEst;
|
int iEst;
|
||||||
int iUpper;
|
int iLower = 0;
|
||||||
int iLower;
|
int iUpper = SQLITE_INDEX_SAMPLES;
|
||||||
u8 aff = p->pTable->aCol[0].affinity;
|
u8 aff = p->pTable->aCol[0].affinity;
|
||||||
|
|
||||||
if( pLower ){
|
if( pLower ){
|
||||||
@@ -2057,17 +2057,14 @@ static int whereRangeScanEst(
|
|||||||
goto range_est_fallback;
|
goto range_est_fallback;
|
||||||
}else if( pLowerVal==0 ){
|
}else if( pLowerVal==0 ){
|
||||||
rc = whereRangeRegion(pParse, p, pUpperVal, &iUpper);
|
rc = whereRangeRegion(pParse, p, pUpperVal, &iUpper);
|
||||||
iLower = pLower ? iUpper/2 : 0;
|
if( pLower ) iLower = iUpper/2;
|
||||||
}else if( pUpperVal==0 ){
|
}else if( pUpperVal==0 ){
|
||||||
rc = whereRangeRegion(pParse, p, pLowerVal, &iLower);
|
rc = whereRangeRegion(pParse, p, pLowerVal, &iLower);
|
||||||
iUpper = pUpper ? (iLower + SQLITE_INDEX_SAMPLES + 1)/2
|
if( pUpper ) iUpper = (iLower + SQLITE_INDEX_SAMPLES + 1)/2;
|
||||||
: SQLITE_INDEX_SAMPLES;
|
|
||||||
}else{
|
}else{
|
||||||
rc = whereRangeRegion(pParse, p, pUpperVal, &iUpper);
|
rc = whereRangeRegion(pParse, p, pUpperVal, &iUpper);
|
||||||
if( rc==SQLITE_OK ){
|
if( rc==SQLITE_OK ){
|
||||||
rc = whereRangeRegion(pParse, p, pLowerVal, &iLower);
|
rc = whereRangeRegion(pParse, p, pLowerVal, &iLower);
|
||||||
}else{
|
|
||||||
iLower = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user