Use a single directory for the FSFS node origin cache instead of a sqlite database.
Perhaps this should be sharded. (However, my only concern here is "too many files in one directory", not "too many small files": there'll only be one file here per file ever made in the repository, so it'll take up no more space than a checkout of one branch of all projects.)
(Technically, the node_origins table is still created in sqlite-util.c, but that whole file is getting the wrecking ball soon.)
* subversion/libsvn_fs_fs/fs_fs.c (): Don't include svn_fs_node_origins.h (path_node_origins): New. (svn_fs_fs_hotcopy): Copy cache. (svn_fs_fs__commit): Call FSFS function instead of sqlite function. (svn_fs_fs__ensure_dir_exists): Moved from ensure_dir_exists in lock.c. (svn_fs_fs__get_node_origin, set_node_origin, svn_fs_fs__set_node_origins, svn_fs_fs__set_node_origin): New.
Wrap sqlite3_stmt inside a svn_fs__sqlite_stmt_t struct, which also includes a pointer to the db.
This has two positive results: - we stop using sqlite3_db_handle, which is relatively new to sqlite - we introduce a few new helpers for getting values from queries, which reduces the number of casts we make
* subversion/libsvn_fs_util/mergeinfo-sqlite-index.c (index_path_mergeinfo, table_has_any_rows_with_rev, parse_mergeinfo_from_db, get_mergeinfo_for_path, get_mergeinfo_for_children): Adjust. (Pool usage may need to be reaudited.)
* subversion/libsvn_fs_util/sqlite-util.h * subversion/libsvn_fs_util/sqlite-util.c (struct svn_fs__sqlite_stmt_t): New. (svn_fs__sqlite_prepare): Take a pool argument; return a struct containing the statement and the db. (step_with_expectation, svn_fs__sqlite_step_done, svn_fs__sqlite_step_row, svn_fs__sqlite_step, svn_fs__sqlite_bind_int64, svn_fs__sqlite_bind_text, svn_fs__sqlite_finalize, svn_fs__sqlite_reset, upgrade_format): Adjust. (svn_fs__sqlite_reset): Remove a random declaration. (svn_fs__sqlite_column_text, svn_fs__sqlite_column_revnum, svn_fs__sqlite_column_boolean, svn_fs__sqlite_column_int): New.