A quick experiment showed a reduction of the on-disk size of the database by ~1.75x. The lookups should also be faster, both due to the reduced database size and due to the lesser amount of internal bsearches. This should improve the times of new commits and `svnadmin load`, especially for large repositories that also have large rep-cache.db files.
In order to maintain compatibility, since SQLite versions prior to 3.8.2 do not support this statement, we only start using it for fsfs format 8 repositories and simultaneously bump the minimal required SQLite version from 3.7.12 (May 2012) to 3.8.2 (December 2013). The last step ensures that all binaries compiled to support format 8 can work with the tables with this optimization. Also, as the various scripts have both the minimal and recommended (184.108.40.206) SQLite versions, we bump the recommended version to the last 3.8.x patch version, which is 220.127.116.11.
* subversion/libsvn_fs_fs/rep-cache-db.sql (STMT_CREATE_SCHEMA): Rename this ... (STMT_CREATE_SCHEMA_V1): ...to this. (STMT_CREATE_SCHEMA_V2): New, enables `WITHOUT ROWID` optimization. (STMT_GET_REP, STMT_SET_REP, STMT_GET_REPS_FOR_RANGE, STMT_GET_MAX_REV, STMT_DEL_REPS_YOUNGER_THAN_REV, STMT_LOCK_REP, STMT_UNLOCK_REP): Note that these statements work for both V1 and V2 schemas.
* subversion/libsvn_fs_fs/rep-cache.c (REP_CACHE_SCHEMA_FORMAT): Remove. (open_rep_cache): Select between creating a V1 or V2 schemas based on the format of the filesystem.
* subversion/libsvn_subr/sqlite.c (): Bump minimum required SQLite version to 3.8.2.
* subversion/tests/cmdline/svnadmin_tests.py (check_hotcopy_fsfs_fsx): Check if the Python's built-in SQLite version is enough to interpret the schema of rep-cache.db, and skip the check if it's not.
* build/generator/gen_win_dependencies.py (_find_sqlite): Bump minimum required SQLite version to 3.8.2.
* configure.ac (SQLITE_MINIMUM_VER): Bump to 3.8.2. (SQLITE_RECOMMENDED_VER): Bump to 18.104.22.168. (SQLITE_RECOMMENDED_VER_REL_YEAR): New, required to construct the download URL which includes the release year for the newer SQLite amalgamation versions. (SQLITE_URL): Update the download URL.
* get-deps.sh (SQLITE_VERSION): Bump to 22.214.171.124. (SQLITE_VERSION_REL_YEAR): New. (get_sqlite): Update the download URL that includes the release year for the newer SQLite amalgamation versions.
* INSTALL (C.12.SQLite): Bump minimum required SQLite version to 3.8.2. (E.1.Prerequisites): Bump the minimum and recommended SQLite versions.