Merge integrity_check and other improvements from trunk.

FossilOrigin-Name: fe073905081b421405ca425ca03c5b8b0ff5f2c8
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index 19c7481..fddfe2a 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -1889,6 +1889,7 @@
 #define TF_OOOHidden       0x0080    /* Out-of-Order hidden columns */
 #define TF_StatsUsed       0x0100    /* Query planner decisions affected by
                                      ** Index.aiRowLogEst[] values */
+#define TF_HasNotNull      0x0200    /* Contains NOT NULL constraints */
 
 /*
 ** Test to see whether or not a table is a virtual table.  This is