Standardize our use of sqlite3_step (which now only appears in one place!). Use the Subversion error system as much as possible instead of passing around sqlite_result values.
* subversion/libsvn_fs_util/sqlite-util.h (svn_fs__sqlite_step_row): New helper function that runs sqlite3_step, expecting SQLITE_ROW to be returned.
* subversion/libsvn_fs_util/sqlite-util.c (svn_fs__sqlite_step_done): Reimplement using step_with_expectation. (step_with_expectation): Guts of svn_fs__sqlite_step_done, now using svn_fs__sqlite_step. (svn_fs__sqlite_step_row): New. (check_format): Use new helpers.
* subversion/libsvn_fs_util/mergeinfo-sqlite-index.c (parse_mergeinfo_from_db): Use new helpers. Also remove a comment about fallthrough that has been meaningless since r22184. (get_mergeinfo_for_path, get_mergeinfo_for_children): Use new helpers.
* subversion/libsvn_fs_util/node-origins-sqlite-index.c (get_origin): Use new helpers.
If a call to svn_fs_mergeinfo__update_index is ultimately going to be a no-op, don't perform any write operations at all.
The upshot of this change is that commits that don't change any svn:mergeinfo will no longer block (or be blocked by) commands that read from the merge tracking database.
* subversion/libsvn_fs_util/mergeinfo-sqlite-index.c (table_has_any_rows_with_rev): New helper function. (clean_tables): New helper function to do the cleanup of failed transactions, factored out of svn_fs_mergeinfo__update_index. (svn_fs_mergeinfo__update_index): Factor out clean_tables.
* subversion/libsvn_fs_util/sqlite-util.c * subversion/libsvn_fs_util/sqlite-util.h (svn_fs__sqlite_step): New helper for calling sqlite3_step when you don't know if you expect SQLITE_ROW or SQLITE_DONE.