Further testing and bug fixing for sqlite_stat3.  Added the Index.avgEq
field to index statistics.  Fixed several problems in the query planner
associated with stat3.

FossilOrigin-Name: 89b2f70884cad0abdf4c66cb64ecddb2820ded74
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index 6bb14b6..f437b20 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -1502,6 +1502,7 @@
   u8 *aSortOrder;  /* Array of size Index.nColumn. True==DESC, False==ASC */
   char **azColl;   /* Array of collation sequence names for index */
 #ifdef SQLITE_ENABLE_STAT3
+  tRowcnt avgEq;           /* Average nEq value for key values not in aSample */
   IndexSample *aSample;    /* Samples of the left-most key */
 #endif
 };
@@ -1520,6 +1521,7 @@
   u16 nByte;        /* Size in byte of text or blob. */
   tRowcnt nEq;      /* Est. number of rows where the key equals this sample */
   tRowcnt nLt;      /* Est. number of rows where key is less than this sample */
+  tRowcnt nDLt;     /* Est. number of distinct keys less than this sample */
 };
 
 /*