On May 26, 2011 9:13 AM, "Philip Martin" <philip.mar...@wandisco.com> wrote: > > Greg Stein <gst...@gmail.com> writes: > > > On May 26, 2011 6:58 AM, <phi...@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