Greg Stein <gstein_at_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, <philip_at_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
Received on 2010-07-16 20:49:24 CEST