Fix a bug in using stat4 data to estimate the number of rows selected by a range constraint.
Fix a segfault in "ALTER TABLE t1 ADD COLUMN b DEFAULT (-+1)". Also an assert() failure that could occur if SQLITE_ENABLE_STAT4 were not defined.
Use a binary search instead of a linear scan when comparing a sample key against data from the sqlite_stat4 table.
Fix problems in estimating the number of rows visited by a range query using sqlite_stat4 data when the column subject to the range query is not the leftmost of the index.