- changed 9 files
fsfs: Use the `WITHOUT ROWID` optimization for rep-cache.db in format 8.This optimization, introduced in SQLite 3.8.2, works well for tables thathave non-integer primary keys, such as hash TEXT NOT NULL PRIMARY KEYin the rep-cache.db. (See the https://sqlite.org/withoutrowid.html articlefor additional details.)A quick experiment showed a reduction of the on-disk size of the databaseby ~1.75x. The lookups should also be faster, both due to the reduceddatabase size and due to the lesser amount of internal bsearches. Thisshould improve the times of new commits and `svnadmin load`, especiallyfor large repositories that also have large rep-cache.db files.In order to maintain compatibility, since SQLite versions prior to 3.8.2do not support this statement, we only start using it for fsfs format 8repositories and simultaneously bump the minimal required SQLite versionfrom 3.7.12 (May 2012) to 3.8.2 (December 2013). The last step ensures thatall binaries compiled to support format 8 can work with the tables withthis optimization. Also, as the various scripts have both the minimaland recommended (18.104.22.168) SQLite versions, we bump the recommendedversion to the last 3.8.x patch version, which is 22.214.171.124.* 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/fs.h (SVN_FS_FS__MIN_REP_CACHE_SCHEMA_V2_FORMAT): New.* 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 126.96.36.199. (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 188.8.131.52. (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.