[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1127864 - in /subversion/trunk/subversion: libsvn_wc/adm_ops.c libsvn_wc/wc_db.c tests/cmdline/authz_tests.py

From: Greg Stein <gstein_at_gmail.com>
Date: Thu, 26 May 2011 09:26:18 -0400

On May 26, 2011 9:13 AM, "Philip Martin" <philip.martin_at_wandisco.com> wrote:
>
> Greg Stein <gstein_at_gmail.com> writes:
>
> > On May 26, 2011 6:58 AM, <philip_at_apache.org> wrote:
> >>
> >> @@ -6078,6 +6078,28 @@ op_delete_txn(void *baton,
> >> || status == svn_wc__db_status_not_present)
> >> return SVN_NO_ERROR;
> >>
> >> + like_arg = construct_like_arg(local_relpath, scratch_pool);
> >> +
> >> + SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
> >> + STMT_SELECT_ABSENT_NODES));
> >> + SVN_ERR(svn_sqlite__bindf(stmt, "iss",
> >> + wcroot->wc_id, local_relpath, like_arg));
> >> + SVN_ERR(svn_sqlite__step(&have_row, stmt));
> >> + if (have_row)
> >
> > Maybe switch to a statement that has a LIMIT 1? That's gotta be way
easier
> > on SQLite.
>
> STMT_SELECT_ABSENT_NODES has LIMIT 1.

Eek. Then I'd say it is named poorly. Maybe something like
STMT_HAS_ABSENT_NODES, since you're not really selecting them (I've used
that naming elsewhere).

>
> >
> >> + {
> >> + const char *absent_path
> >> + = svn_dirent_local_style(svn_sqlite__column_text(stmt, 0,
> > scratch_pool),
> >> + scratch_pool);
> >
> > The column fetch can use NULL for the pool.
>
> svn_dirent_local_style can return the input path, I'd need to generate
> the error message before calling svn_sqlite__reset.

Yikes. Didn't know that. Thanks for the Clue!

Cheers,
-g
Received on 2011-05-26 15:26:50 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.