You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@gmail.com> on 2010/07/16 18:24:54 UTC

Re: svn commit: r964729 - /subversion/trunk/subversion/libsvn_wc/wc_db.c

This is just scattering them around, rather than thinking about where
they should go.

Basically, reset as soon as possible after pulling column values. That
means after the assignment of "levels", where column_int() is called,
and then in an else branch of the got_row test.

Thus, a reset isn't needed after the while loop.

Cheers,
-g

On Fri, Jul 16, 2010 at 05:35,  <ph...@apache.org> wrote:
> Author: philip
> Date: Fri Jul 16 09:35:39 2010
> New Revision: 964729
>
> URL: http://svn.apache.org/viewvc?rev=964729&view=rev
> Log:
> * subversion/libsvn_wc/wc_db.c (wclock_obtain_cb): Add two resets.
>
> Modified:
>    subversion/trunk/subversion/libsvn_wc/wc_db.c
>
> Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=964729&r1=964728&r2=964729&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
> +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Jul 16 09:35:39 2010
> @@ -7764,8 +7764,11 @@ wclock_obtain_cb(void *baton,
>         break;
>
>       lock_relpath = svn_relpath_dirname(lock_relpath, scratch_pool);
> +
> +      SVN_ERR(svn_sqlite__reset(stmt));
>     }
>
> +  SVN_ERR(svn_sqlite__reset(stmt));
>   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
>                                     STMT_INSERT_WC_LOCK));
>   SVN_ERR(svn_sqlite__bindf(stmt, "isi", wcroot->wc_id,
>
>
>

Re: svn commit: r964729 - /subversion/trunk/subversion/libsvn_wc/wc_db.c

Posted by Philip Martin <ph...@wandisco.com>.
Greg Stein <gs...@gmail.com> writes:

> This is just scattering them around, rather than thinking about where
> they should go.
>
> Basically, reset as soon as possible after pulling column values. That
> means after the assignment of "levels", where column_int() is called,
> and then in an else branch of the got_row test.
>
> Thus, a reset isn't needed after the while loop.

I don't understand the policy.  I realise that _reset before
_get_statement is optional (because _get_statement will _reset if
needed) but we have been putting them in.  There is one just before
the loop, line 7726.  How is that different from the one after the
loop, line 7776?

>
> Cheers,
> -g
>
> On Fri, Jul 16, 2010 at 05:35,  <ph...@apache.org> wrote:
>> Author: philip
>> Date: Fri Jul 16 09:35:39 2010
>> New Revision: 964729
>>
>> URL: http://svn.apache.org/viewvc?rev=964729&view=rev
>> Log:
>> * subversion/libsvn_wc/wc_db.c (wclock_obtain_cb): Add two resets.
>>
>> Modified:
>>    subversion/trunk/subversion/libsvn_wc/wc_db.c
>>
>> Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
>> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=964729&r1=964728&r2=964729&view=diff
>> ==============================================================================
>> --- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
>> +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Jul 16 09:35:39 2010
>> @@ -7764,8 +7764,11 @@ wclock_obtain_cb(void *baton,
>>         break;
>>
>>       lock_relpath = svn_relpath_dirname(lock_relpath, scratch_pool);
>> +
>> +      SVN_ERR(svn_sqlite__reset(stmt));
>>     }
>>
>> +  SVN_ERR(svn_sqlite__reset(stmt));
>>   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
>>                                     STMT_INSERT_WC_LOCK));
>>   SVN_ERR(svn_sqlite__bindf(stmt, "isi", wcroot->wc_id,
>>
>>
>>
>

-- 
Philip