Fix compiler warnings.  Better comments on some variables associated with
LIKE/GLOB processing in the query planner.

FossilOrigin-Name: cfa2db0ff7a94e7f66c35f672ee41cadd45a6dd7
diff --git a/manifest b/manifest
index 2e39dc8..a553480 100644
--- 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/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.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/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/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-----
diff --git a/manifest.uuid b/manifest.uuid
index 1afed63..c753616 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-612952743da28e651512547fc0d3925f4c698eb4
\ No newline at end of file
+cfa2db0ff7a94e7f66c35f672ee41cadd45a6dd7
\ No newline at end of file
diff --git a/src/btree.c b/src/btree.c
index 7c95d68..7e49506 100644
--- a/src/btree.c
+++ b/src/btree.c
@@ -6454,7 +6454,7 @@
 ){
   int rc;
   int loc = seekResult;          /* -1: before desired location  +1: after */
-  int szNew;
+  int szNew = 0;
   int idx;
   MemPage *pPage;
   Btree *p = pCur->pBtree;
diff --git a/src/os_unix.c b/src/os_unix.c
index 37447ac..b31fbab 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -2542,7 +2542,8 @@
   ** 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 */
diff --git a/src/where.c b/src/where.c
index 70642fc..f17853d 100644
--- a/src/where.c
+++ b/src/where.c
@@ -1098,13 +1098,13 @@
   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 @@
   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);