> -----Original Message-----
> From: phi...@apache.org [mailto:phi...@apache.org]
> Sent: woensdag 25 juli 2012 13:01
> To: comm...@subversion.apache.org
> Subject: svn commit: r1365518 -
> /subversion/trunk/subversion/libsvn_fs_fs/rep-cache.c
> 
> Author: philip
> Date: Wed Jul 25 11:01:26 2012
> New Revision: 1365518
> 
> URL: http://svn.apache.org/viewvc?rev=1365518&view=rev
> Log:
> Fix issue 4029, verify fails on r0 for FSFS repo with empty rep-cache.
> 
> * subversion/libsvn_fs_fs/rep-cache.c
>   (svn_fs_fs__walk_rep_reference): Handle empty cache, remove pointless
>    comment.
> 
> Modified:
>     subversion/trunk/subversion/libsvn_fs_fs/rep-cache.c
> 
> Modified: subversion/trunk/subversion/libsvn_fs_fs/rep-cache.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/re
> p-cache.c?rev=1365518&r1=1365517&r2=1365518&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/subversion/libsvn_fs_fs/rep-cache.c (original)
> +++ subversion/trunk/subversion/libsvn_fs_fs/rep-cache.c Wed Jul 25
> 11:01:26 2012
> @@ -158,11 +158,11 @@ svn_fs_fs__walk_rep_reference(svn_fs_t *
>                                          STMT_GET_MAX_REV));
>        SVN_ERR(svn_sqlite__step(&have_row, stmt2));
>        max = svn_sqlite__column_revnum(stmt2, 0);
> -      SVN_ERR(svn_fs_fs__revision_exists(max, fs, iterpool));
> +      if (SVN_IS_VALID_REVNUM(max))  /* The rep-cache could be empty. */
> +        SVN_ERR(svn_fs_fs__revision_exists(max, fs, iterpool));
>        SVN_ERR(svn_sqlite__reset(stmt2));

Not really part of this patch, but this code will not call sqlite__reset on 
failure which will keep the sqlite database read-locked until it is reset or 
the sqlite database closed.

        Bert
>      }
> 
> -  /* Get the statement. (There are no arguments to bind.) */
>    SVN_ERR(svn_sqlite__get_statement(&stmt, ffd->rep_cache_db,
>                                      STMT_GET_REPS_FOR_RANGE));
>    SVN_ERR(svn_sqlite__bindf(stmt, "rr",
> 


Reply via email to