FreeBSD/contrib/subversion/subversion/libsvn_subr/sqlite.c
/* Run the statement SQL on DB, ignoring SQLITE_OK and IGNORED_ERR.
   (Note: the IGNORED_ERR parameter itself is not ignored.) */
Run the statement SQL on DB, ignoring SQLITE_OK and IGNORED_ERR.
(Note: the IGNORED_ERR parameter itself is not ignored.)
Run the statement SQL on DB ignoring SQLITE_OK and IGNORED_ERR . ( Note : the IGNORED_ERR parameter itself is not ignored . )
static svn_error_t *
exec_sql2(svn_sqlite__db_t *db, const char *sql, int ignored_err)
{
  char *err_msg;
  int sqlite_err = sqlite3_exec(db->db3, sql, NULL, NULL, &err_msg);
  if (sqlite_err != SQLITE_OK && sqlite_err != ignored_err)
    {
      svn_error_t *err = svn_error_createf(SQLITE_ERROR_CODE(sqlite_err), NULL,
                                           _("sqlite[S%d]: %s,"
                                             " executing statement '%s'"),
                                           sqlite_err, err_msg, sql);
      sqlite3_free(err_msg);
      return err;
    }
  return SVN_NO_ERROR;
}
static svn_error_t * exec_sql2 ( svn_sqlite__db_t * db , const char * sql , int ignored_err ) { char * err_msg ; int sqlite_err = sqlite3_exec ( db -> db3 , sql , NULL , NULL , & err_msg ) ; if ( sqlite_err != SQLITE_OK && sqlite_err != ignored_err ) { svn_error_t * err = svn_error_createf ( SQLITE_ERROR_CODE ( sqlite_err ) , NULL , _ ( " " " " ) , sqlite_err , err_msg , sql ) ; sqlite3_free ( err_msg ) ; return err ; } return SVN_NO_ERROR ; }
Run the statement SQL on DB, ignoring SQLITE_OK and IGNORED_ERR.
Run the statement SQL on DB ignoring SQLITE_OK and IGNORED_ERR .