[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: Julian Foad <julianfoad_at_btopenworld.com>
Date: Fri, 27 Apr 2012 22:04:45 +0100 (BST)

> 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.

- 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-27 23:05:21 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.