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

Re: Queries on two instances of __bind_int64(revnum) in WC

From: Daniel Shahaf <danielsh_at_elego.de>
Date: Sat, 28 Apr 2012 11:55:02 +0300

Julian Foad wrote on Fri, Apr 27, 2012 at 22:04:45 +0100:
> > Can anyone advise on these?
>
>
> One point being the semantics is different: _bind_revnum sets column to NULL for INVALID_REVNUM.
>
> Don't know if INVALID_REVNUM ever can hit these two particular code paths.
>

You could check that by throwing an assert() there and running the test
suite?

> - Julian
>
>
> > Index: subversion/libsvn_wc/entries.c
> > ===================================================================
> > --- subversion/libsvn_wc/entries.c    (revision 1331595)
> > +++ subversion/libsvn_wc/entries.c    (working copy)
> > @@ -1441,12 +1441,13 @@ insert_node(svn_sqlite__db_t *sdb,
> >    if (node->repos_relpath)
> >      {
> >        SVN_ERR(svn_sqlite__bind_int64(stmt, 5,
> >                                       node->repos_id));
> >        SVN_ERR(svn_sqlite__bind_text(stmt, 6,
> >                                      node->repos_relpath));
> > +      /* ### Shouldn't this use __bind_revnum?  (If not, say why.) */
> >        SVN_ERR(svn_sqlite__bind_int64(stmt, 7, node->revision));
> >      }
> >  
> >    if (node->presence == svn_wc__db_status_normal)
> >      SVN_ERR(svn_sqlite__bind_text(stmt, 8, "normal"));
> >    else if (node->presence == svn_wc__db_status_not_present)
> > Index: subversion/libsvn_wc/wc_db.c
> > ===================================================================
> > --- subversion/libsvn_wc/wc_db.c    (revision 1331595)
> > +++ subversion/libsvn_wc/wc_db.c    (working copy)
> > @@ -1082,12 +1082,13 @@ insert_working_node(void *baton,
> >      }
> >  
> >    if (piwb->original_repos_relpath != NULL)
> >      {
> >        SVN_ERR(svn_sqlite__bind_int64(stmt, 5, piwb->original_repos_id));
> >        SVN_ERR(svn_sqlite__bind_text(stmt, 6, piwb->original_repos_relpath));
> > +      /* ### Shouldn't this use __bind_revnum?  (If not, say why.) */
> >        SVN_ERR(svn_sqlite__bind_int64(stmt, 7, piwb->original_revnum));
> >      }
> >  
> >    SVN_ERR(svn_sqlite__bind_properties(stmt, 15, piwb->props, scratch_pool));
> >  
> >    SVN_ERR(svn_sqlite__insert(NULL, stmt));
> >
> >
> > - Julian
> >
Received on 2012-04-28 10:55:49 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.