Author: svn-role
Date: Thu Dec 20 04:00:49 2012
New Revision: 1424285
URL: http://svn.apache.org/viewvc?rev=1424285&view=rev
Log:
Merge r1422100 from trunk:
* r1422100
Delay storing handle to fix assert when rep-cache is inaccessible.
Justification:
It's an assert.
Votes:
+1: philip, danielsh, rhuijben
Modified:
subversion/branches/1.7.x/ (props changed)
subversion/branches/1.7.x/STATUS
subversion/branches/1.7.x/subversion/libsvn_fs_fs/rep-cache.c
Propchange: subversion/branches/1.7.x/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1422100
Modified: subversion/branches/1.7.x/STATUS
URL:
http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1424285&r1=1424284&r2=1424285&view=diff
==============================================================================
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Thu Dec 20 04:00:49 2012
@@ -102,10 +102,3 @@ Veto-blocked changes:
Approved changes:
=================
-
- * r1422100
- Delay storing handle to fix assert when rep-cache is inaccessible.
- Justification:
- It's an assert.
- Votes:
- +1: philip, danielsh, rhuijben
Modified: subversion/branches/1.7.x/subversion/libsvn_fs_fs/rep-cache.c
URL:
http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_fs_fs/rep-cache.c?rev=1424285&r1=1424284&r2=1424285&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_fs_fs/rep-cache.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_fs_fs/rep-cache.c Thu Dec 20
04:00:49 2012
@@ -45,26 +45,30 @@ open_rep_cache(void *baton,
{
svn_fs_t *fs = baton;
fs_fs_data_t *ffd = fs->fsap_data;
+ svn_sqlite__db_t *sdb;
const char *db_path;
int version;
/* Open (or create) the sqlite database. It will be automatically
closed when fs->pool is destoyed. */
db_path = svn_dirent_join(fs->path, REP_CACHE_DB_NAME, pool);
- SVN_ERR(svn_sqlite__open(&ffd->rep_cache_db, db_path,
+ SVN_ERR(svn_sqlite__open(&sdb, db_path,
svn_sqlite__mode_rwcreate, statements,
0, NULL,
fs->pool, pool));
- SVN_ERR(svn_sqlite__read_schema_version(&version, ffd->rep_cache_db, pool));
+ SVN_ERR(svn_sqlite__read_schema_version(&version, sdb, pool));
if (version < REP_CACHE_SCHEMA_FORMAT)
{
/* Must be 0 -- an uninitialized (no schema) database. Create
the schema. Results in schema version of 1. */
- SVN_ERR(svn_sqlite__exec_statements(ffd->rep_cache_db,
- STMT_CREATE_SCHEMA));
+ SVN_ERR(svn_sqlite__exec_statements(sdb, STMT_CREATE_SCHEMA));
}
+ /* This is used as a flag that the database is available so don't
+ set it earlier. */
+ ffd->rep_cache_db = sdb;
+
return SVN_NO_ERROR;
}