FreeBSD/contrib/subversion/subversion/libsvn_wc/wc_db_wcroot.c
/* Verify if the sqlite_stat1 table exists and if not tries to add
   this table (but ignores errors on adding the schema) */
Verify if the sqlite_stat1 table exists and if not tries to add
this table (but ignores errors on adding the schema)
Verify if the sqlite_stat1 table exists and if not tries to add this table ( but ignores errors on adding the schema )
static svn_error_t *
verify_stats_table(svn_sqlite__db_t *sdb,
                   int format,
                   apr_pool_t *scratch_pool)
{
  svn_sqlite__stmt_t *stmt;
  svn_boolean_t have_row;
  if (format != SVN_WC__ENSURE_STAT1_TABLE)
    return SVN_NO_ERROR;
  SVN_ERR(svn_sqlite__get_statement(&stmt, sdb,
                                    STMT_HAVE_STAT1_TABLE));
  SVN_ERR(svn_sqlite__step(&have_row, stmt));
  SVN_ERR(svn_sqlite__reset(stmt));
  if (!have_row)
    {
      svn_error_clear(
          svn_wc__db_install_schema_statistics(sdb, scratch_pool));
    }
  return SVN_NO_ERROR;
}
static svn_error_t * verify_stats_table ( svn_sqlite__db_t * sdb , int format , apr_pool_t * scratch_pool ) { svn_sqlite__stmt_t * stmt ; svn_boolean_t have_row ; if ( format != SVN_WC__ENSURE_STAT1_TABLE ) return SVN_NO_ERROR ; SVN_ERR ( svn_sqlite__get_statement ( & stmt , sdb , STMT_HAVE_STAT1_TABLE ) ) ; SVN_ERR ( svn_sqlite__step ( & have_row , stmt ) ) ; SVN_ERR ( svn_sqlite__reset ( stmt ) ) ; if ( ! have_row ) { svn_error_clear ( svn_wc__db_install_schema_statistics ( sdb , scratch_pool ) ) ; } return SVN_NO_ERROR ; }
Verify if the sqlite_stat1 table exists and if not tries to add
this table (but ignores errors on adding the schema)
Verify if the sqlite_stat1 table exists and if not tries to add this table ( but ignores errors on adding the schema )