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

Fix compiler warnings. Better comments on some variables associated with

LIKE/GLOB processing in the query planner.

FossilOrigin-Name: cfa2db0ff7a94e7f66c35f672ee41cadd45a6dd7
This commit is contained in:
drh
2009-11-01 19:26:59 +00:00
parent 1aca4f968c
commit 1d452e1de0
5 changed files with 26 additions and 23 deletions

View File

@@ -1,8 +1,8 @@
-----BEGIN PGP SIGNED MESSAGE----- -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 Hash: SHA1
C Increase\sthe\sversion\snumber\sto\s3.6.20. C Fix\scompiler\swarnings.\s\sBetter\scomments\son\ssome\svariables\sassociated\swith\nLIKE/GLOB\sprocessing\sin\sthe\squery\splanner.
D 2009-10-30T14:27:15 D 2009-11-01T19:26:59
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in a77dfde96ad86aafd3f71651a4333a104debe86a F Makefile.in a77dfde96ad86aafd3f71651a4333a104debe86a
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -109,7 +109,7 @@ F src/auth.c a5471a6951a18f79d783da34be22cd94dfbe603a
F src/backup.c 6f1c2d9862c8a3feb7739dfcca02c1f5352e37f3 F src/backup.c 6f1c2d9862c8a3feb7739dfcca02c1f5352e37f3
F src/bitvec.c ed215b95734045e58358c3b3e16448f8fe6a235a F src/bitvec.c ed215b95734045e58358c3b3e16448f8fe6a235a
F src/btmutex.c 0f43a75bb5b8147b386e8e1c3e71ba734e3863b7 F src/btmutex.c 0f43a75bb5b8147b386e8e1c3e71ba734e3863b7
F src/btree.c b2d060e41b4318fb5e52d80b75e19bcef1b1f2db F src/btree.c 3b29423f08987bddeb115562d6a699b002f653ae
F src/btree.h 577448a890c2ab9b21e6ab74f073526184bceebe F src/btree.h 577448a890c2ab9b21e6ab74f073526184bceebe
F src/btreeInt.h 1c863e543bb55772fa8db95535c370bb386c578c F src/btreeInt.h 1c863e543bb55772fa8db95535c370bb386c578c
F src/build.c 3c5762687d0554ebe8844dfaddb828fcc15fe16d F src/build.c 3c5762687d0554ebe8844dfaddb828fcc15fe16d
@@ -149,7 +149,7 @@ F src/os.c 8d62d8d98ad7909cb0dd294c1e5f3835c887ccb6
F src/os.h 00a1334a4eecee7f7bef79ac606b88d325119f21 F src/os.h 00a1334a4eecee7f7bef79ac606b88d325119f21
F src/os_common.h 8c61457df58f1a4bd5f5adc3e90e01b37bf7afbc F src/os_common.h 8c61457df58f1a4bd5f5adc3e90e01b37bf7afbc
F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5 F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5
F src/os_unix.c 5686c0e4f0aa2c93b43b66c563ea1d5b80cd4b9b F src/os_unix.c a4b4ea928ce31ed34cb8f90ed36a35df19312fad
F src/os_win.c d02908847f3ad350fb9fd0804b7722627d30860d F src/os_win.c d02908847f3ad350fb9fd0804b7722627d30860d
F src/pager.c ebd0a8f2421e8f0ad5b78201440004bf3e1c96d8 F src/pager.c ebd0a8f2421e8f0ad5b78201440004bf3e1c96d8
F src/pager.h 11852d044c86cf5a9d6e34171fb0c4fcf1f6265f F src/pager.h 11852d044c86cf5a9d6e34171fb0c4fcf1f6265f
@@ -217,7 +217,7 @@ F src/vdbeblob.c 9bfaeab22e261a6a7b6df04e7faaf7d6dfdbef5a
F src/vdbemem.c 7055a2941a7802094f4704cedc7a28cc88a23749 F src/vdbemem.c 7055a2941a7802094f4704cedc7a28cc88a23749
F src/vtab.c 3e54fe39374e5feb8b174de32a90e7a21966025d F src/vtab.c 3e54fe39374e5feb8b174de32a90e7a21966025d
F src/walker.c 1edca756275f158b80f20eb6f104c8d3fcc96a04 F src/walker.c 1edca756275f158b80f20eb6f104c8d3fcc96a04
F src/where.c 3809a594a61b32666b1fb92a475ed1e864ff986c F src/where.c fac37876e09e005e52cdfcf896090b6f5ebbf25b
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
@@ -764,14 +764,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 d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
P 7253f8fad1efe6b88666f0f8740d247ff07a7640 P 612952743da28e651512547fc0d3925f4c698eb4
R 38869d9ed2515febb53b97d47a7e9c4f R 074de9658c3cbab2627eebe475a5eccf
U drh U drh
Z 245f9669af8fc778bf9906a60e95fb3b Z 9daa7957e26dec230ab28c44ffc262ec
-----BEGIN PGP SIGNATURE----- -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux) Version: GnuPG v1.4.8 (Darwin)
iD8DBQFK6vfHoxKgR168RlERAtnMAJ9dNPmy4zCNb542FVKapTqLBdAgLwCaA9i5 iEYEARECAAYFAkrt4QMACgkQoxKgR168RlFoyACfRiKYJgjLjh6IjkSJu6thjsgq
xFB4D0eR+OR/ape4W3ChPwE= xiQAn0pCS//cHUfwD80J45UQYZEGz+00
=Ec8b =KSFH
-----END PGP SIGNATURE----- -----END PGP SIGNATURE-----

View File

@@ -1 +1 @@
612952743da28e651512547fc0d3925f4c698eb4 cfa2db0ff7a94e7f66c35f672ee41cadd45a6dd7

View File

@@ -6454,7 +6454,7 @@ int sqlite3BtreeInsert(
){ ){
int rc; int rc;
int loc = seekResult; /* -1: before desired location +1: after */ int loc = seekResult; /* -1: before desired location +1: after */
int szNew; int szNew = 0;
int idx; int idx;
MemPage *pPage; MemPage *pPage;
Btree *p = pCur->pBtree; Btree *p = pCur->pBtree;

View File

@@ -2542,7 +2542,8 @@ static int afpLock(sqlite3_file *id, int locktype){
** operating system calls for the specified lock. ** operating system calls for the specified lock.
*/ */
if( locktype==SHARED_LOCK ){ if( locktype==SHARED_LOCK ){
int lk, lrc1, lrc2, lrc1Errno; int lk, lrc1, lrc2;
int lrc1Errno = 0;
/* Now get the read-lock SHARED_LOCK */ /* Now get the read-lock SHARED_LOCK */
/* note that the quality of the randomness doesn't matter that much */ /* note that the quality of the randomness doesn't matter that much */

View File

@@ -1098,13 +1098,13 @@ static void exprAnalyze(
Expr *pExpr; /* The expression to be analyzed */ Expr *pExpr; /* The expression to be analyzed */
Bitmask prereqLeft; /* Prerequesites of the pExpr->pLeft */ Bitmask prereqLeft; /* Prerequesites of the pExpr->pLeft */
Bitmask prereqAll; /* Prerequesites of pExpr */ Bitmask prereqAll; /* Prerequesites of pExpr */
Bitmask extraRight = 0; Bitmask extraRight = 0; /* */
int isComplete; Expr *pStr1 = 0; /* RHS of LIKE/GLOB operator */
int noCase; int isComplete = 0; /* RHS of LIKE/GLOB ends with wildcard */
int noCase = 0; /* LIKE/GLOB distinguishes case */
int op; /* Top-level operator. pExpr->op */ int op; /* Top-level operator. pExpr->op */
Parse *pParse = pWC->pParse; /* Parsing context */ Parse *pParse = pWC->pParse; /* Parsing context */
sqlite3 *db = pParse->db; /* Database connection */ sqlite3 *db = pParse->db; /* Database connection */
Expr *pStr1;
if( db->mallocFailed ){ if( db->mallocFailed ){
return; return;
@@ -1239,10 +1239,12 @@ static void exprAnalyze(
if( pWC->op==TK_AND if( pWC->op==TK_AND
&& isLikeOrGlob(pParse, pExpr, &pStr1, &isComplete, &noCase) && isLikeOrGlob(pParse, pExpr, &pStr1, &isComplete, &noCase)
){ ){
Expr *pLeft; Expr *pLeft; /* LHS of LIKE/GLOB operator */
Expr *pStr2; Expr *pStr2; /* Copy of pStr1 - RHS of LIKE/GLOB operator */
Expr *pNewExpr1, *pNewExpr2; Expr *pNewExpr1;
int idxNew1, idxNew2; Expr *pNewExpr2;
int idxNew1;
int idxNew2;
pLeft = pExpr->x.pList->a[1].pExpr; pLeft = pExpr->x.pList->a[1].pExpr;
pStr2 = sqlite3ExprDup(db, pStr1, 0); pStr2 = sqlite3ExprDup(db, pStr1, 0);