subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1005774 - /subversion/trunk/subversion/libsvn_wc/wc_db.c
Date Fri, 08 Oct 2010 11:12:57 GMT
Author: rhuijben
Date: Fri Oct  8 11:12:56 2010
New Revision: 1005774

URL: http://svn.apache.org/viewvc?rev=1005774&view=rev
Log:
Following up on r1005766, only query ACTUAL_NODE from svn_wc__db_read_info()
when we actually need values from this table.

* subversion/libsvn_wc/wc_db.c
  (svn_wc__db_read_info): Remove two unused variables and only fetch the
    actual node record when we need information from that table.

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=1005774&r1=1005773&r2=1005774&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Oct  8 11:12:56 2010
@@ -4303,8 +4303,6 @@ svn_wc__db_read_info(svn_wc__db_status_t
   svn_sqlite__stmt_t *stmt_info;
   svn_sqlite__stmt_t *stmt_act;
   svn_boolean_t have_info;
-  svn_boolean_t local_have_base;
-  svn_boolean_t local_have_work;
   svn_boolean_t have_act;
   svn_error_t *err = NULL;
 
@@ -4324,11 +4322,16 @@ svn_wc__db_read_info(svn_wc__db_status_t
                             pdh->wcroot->wc_id, local_relpath));
   SVN_ERR(svn_sqlite__step(&have_info, stmt_info));
 
-  SVN_ERR(svn_sqlite__get_statement(&stmt_act, pdh->wcroot->sdb,
-                                    STMT_SELECT_ACTUAL_NODE));
-  SVN_ERR(svn_sqlite__bindf(stmt_act, "is",
-                            pdh->wcroot->wc_id, local_relpath));
-  SVN_ERR(svn_sqlite__step(&have_act, stmt_act));
+  if (changelist || conflicted || props_mod)
+    {
+      SVN_ERR(svn_sqlite__get_statement(&stmt_act, pdh->wcroot->sdb,
+                                        STMT_SELECT_ACTUAL_NODE));
+      SVN_ERR(svn_sqlite__bindf(stmt_act, "is",
+                                pdh->wcroot->wc_id, local_relpath));
+      SVN_ERR(svn_sqlite__step(&have_act, stmt_act));
+    }
+  else
+    have_act = FALSE;
 
   if (have_info)
     {
@@ -4615,8 +4618,10 @@ svn_wc__db_read_info(svn_wc__db_status_t
                                                      scratch_pool));
     }
 
-  err = svn_error_compose_create(err, svn_sqlite__reset(stmt_info));
-  SVN_ERR(svn_error_compose_create(err, svn_sqlite__reset(stmt_act)));
+  if (have_act)
+    err = svn_error_compose_create(err, svn_sqlite__reset(stmt_act));
+
+  SVN_ERR(svn_error_compose_create(err, svn_sqlite__reset(stmt_info)));
 
   /* ### And finally, check for tree conflicts via parent.
          This reuses stmt_act and throws an error in Sqlite if



Mime
View raw message