]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix compiler warnings. Better comments on some variables associated with
authordrh <drh@noemail.net>
Sun, 1 Nov 2009 19:26:59 +0000 (19:26 +0000)
committerdrh <drh@noemail.net>
Sun, 1 Nov 2009 19:26:59 +0000 (19:26 +0000)
LIKE/GLOB processing in the query planner.

FossilOrigin-Name: cfa2db0ff7a94e7f66c35f672ee41cadd45a6dd7

manifest
manifest.uuid
src/btree.c
src/os_unix.c
src/where.c

index 2e39dc8debfc897b01bda5518ea55c8af8efd2e9..a5534803639891fdffcfc73bf988caf70e946c0b 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,8 +1,8 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-C Increase\sthe\sversion\snumber\sto\s3.6.20.
-D 2009-10-30T14:27:15
+C Fix\scompiler\swarnings.\s\sBetter\scomments\son\ssome\svariables\sassociated\swith\nLIKE/GLOB\sprocessing\sin\sthe\squery\splanner.
+D 2009-11-01T19:26:59
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in a77dfde96ad86aafd3f71651a4333a104debe86a
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -109,7 +109,7 @@ F src/auth.c a5471a6951a18f79d783da34be22cd94dfbe603a
 F src/backup.c 6f1c2d9862c8a3feb7739dfcca02c1f5352e37f3
 F src/bitvec.c ed215b95734045e58358c3b3e16448f8fe6a235a
 F src/btmutex.c 0f43a75bb5b8147b386e8e1c3e71ba734e3863b7
-F src/btree.c b2d060e41b4318fb5e52d80b75e19bcef1b1f2db
+F src/btree.c 3b29423f08987bddeb115562d6a699b002f653ae
 F src/btree.h 577448a890c2ab9b21e6ab74f073526184bceebe
 F src/btreeInt.h 1c863e543bb55772fa8db95535c370bb386c578c
 F src/build.c 3c5762687d0554ebe8844dfaddb828fcc15fe16d
@@ -149,7 +149,7 @@ F src/os.c 8d62d8d98ad7909cb0dd294c1e5f3835c887ccb6
 F src/os.h 00a1334a4eecee7f7bef79ac606b88d325119f21
 F src/os_common.h 8c61457df58f1a4bd5f5adc3e90e01b37bf7afbc
 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/pager.c ebd0a8f2421e8f0ad5b78201440004bf3e1c96d8
 F src/pager.h 11852d044c86cf5a9d6e34171fb0c4fcf1f6265f
@@ -217,7 +217,7 @@ F src/vdbeblob.c 9bfaeab22e261a6a7b6df04e7faaf7d6dfdbef5a
 F src/vdbemem.c 7055a2941a7802094f4704cedc7a28cc88a23749
 F src/vtab.c 3e54fe39374e5feb8b174de32a90e7a21966025d
 F src/walker.c 1edca756275f158b80f20eb6f104c8d3fcc96a04
-F src/where.c 3809a594a61b32666b1fb92a475ed1e864ff986c
+F src/where.c fac37876e09e005e52cdfcf896090b6f5ebbf25b
 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
 F test/alias.test 4529fbc152f190268a15f9384a5651bbbabc9d87
 F test/all.test 14165b3e32715b700b5f0cbf8f6e3833dda0be45
@@ -764,14 +764,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P 7253f8fad1efe6b88666f0f8740d247ff07a7640
-R 38869d9ed2515febb53b97d47a7e9c4f
+P 612952743da28e651512547fc0d3925f4c698eb4
+R 074de9658c3cbab2627eebe475a5eccf
 U drh
-Z 245f9669af8fc778bf9906a60e95fb3b
+Z 9daa7957e26dec230ab28c44ffc262ec
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.6 (GNU/Linux)
+Version: GnuPG v1.4.8 (Darwin)
 
-iD8DBQFK6vfHoxKgR168RlERAtnMAJ9dNPmy4zCNb542FVKapTqLBdAgLwCaA9i5
-xFB4D0eR+OR/ape4W3ChPwE=
-=Ec8b
+iEYEARECAAYFAkrt4QMACgkQoxKgR168RlFoyACfRiKYJgjLjh6IjkSJu6thjsgq
+xiQAn0pCS//cHUfwD80J45UQYZEGz+00
+=KSFH
 -----END PGP SIGNATURE-----
index 1afed63910b00cc337cafeb9bcba849e6ce79acd..c7536166897475667bdde4f170cd472a10efd806 100644 (file)
@@ -1 +1 @@
-612952743da28e651512547fc0d3925f4c698eb4
\ No newline at end of file
+cfa2db0ff7a94e7f66c35f672ee41cadd45a6dd7
\ No newline at end of file
index 7c95d68dcb63f6fba4f5bbfbc6d41e5b60034299..7e495061a81081fc34039f0fee51c58a1350116c 100644 (file)
@@ -6454,7 +6454,7 @@ int sqlite3BtreeInsert(
 ){
   int rc;
   int loc = seekResult;          /* -1: before desired location  +1: after */
-  int szNew;
+  int szNew = 0;
   int idx;
   MemPage *pPage;
   Btree *p = pCur->pBtree;
index 37447ac402666a4351b2c0e03babdf31b6fae837..b31fbab2154e18043028a212ae5ca87ec01523b2 100644 (file)
@@ -2542,7 +2542,8 @@ static int afpLock(sqlite3_file *id, int locktype){
   ** operating system calls for the specified lock.
   */
   if( locktype==SHARED_LOCK ){
-    int lk, lrc1, lrc2, lrc1Errno;
+    int lk, lrc1, lrc2;
+    int lrc1Errno = 0;
     
     /* Now get the read-lock SHARED_LOCK */
     /* note that the quality of the randomness doesn't matter that much */
index 70642fc5bacb825d52ecd96ae45414db56b69ed6..f17853d5fa047ffc6256bedfb6dcb84c512c2b61 100644 (file)
@@ -1098,13 +1098,13 @@ static void exprAnalyze(
   Expr *pExpr;                     /* The expression to be analyzed */
   Bitmask prereqLeft;              /* Prerequesites of the pExpr->pLeft */
   Bitmask prereqAll;               /* Prerequesites of pExpr */
-  Bitmask extraRight = 0;
-  int isComplete;
-  int noCase;
+  Bitmask extraRight = 0;          /* */
+  Expr *pStr1 = 0;                 /* RHS of LIKE/GLOB operator */
+  int isComplete = 0;              /* RHS of LIKE/GLOB ends with wildcard */
+  int noCase = 0;                  /* LIKE/GLOB distinguishes case */
   int op;                          /* Top-level operator.  pExpr->op */
   Parse *pParse = pWC->pParse;     /* Parsing context */
   sqlite3 *db = pParse->db;        /* Database connection */
-  Expr *pStr1;
 
   if( db->mallocFailed ){
     return;
@@ -1239,10 +1239,12 @@ static void exprAnalyze(
   if( pWC->op==TK_AND 
    && isLikeOrGlob(pParse, pExpr, &pStr1, &isComplete, &noCase)
   ){
-    Expr *pLeft;
-    Expr *pStr2;
-    Expr *pNewExpr1, *pNewExpr2;
-    int idxNew1, idxNew2;
+    Expr *pLeft;       /* LHS of LIKE/GLOB operator */
+    Expr *pStr2;       /* Copy of pStr1 - RHS of LIKE/GLOB operator */
+    Expr *pNewExpr1;
+    Expr *pNewExpr2;
+    int idxNew1;
+    int idxNew2;
 
     pLeft = pExpr->x.pList->a[1].pExpr;
     pStr2 = sqlite3ExprDup(db, pStr1, 0);