Author: pburba
Date: Thu Sep  6 14:20:09 2012
New Revision: 1381613

URL: http://svn.apache.org/viewvc?rev=1381613&view=rev
Log:
On the inheritable-props branch: Minor iprop query tweak and some comments.

* subversion/libsvn_wc/wc-queries.sql

  (STMT_SELECT_IPROPS): Hard code op_depth=0, the only executor of this query
   always passed 0.  Add a comment.

  (STMT_UPDATE_IPROP,
   STMT_SELECT_INODES,
   STMT_SELECT_INODES_RECURSIVE): Add brief comments on what each query does.

* subversion/libsvn_wc/wc_db.c

  (svn_wc__db_read_cached_iprops): Don't bind op_depth to 0, the query knows
   we only want base nodes.

Modified:
    subversion/branches/inheritable-props/subversion/libsvn_wc/wc-queries.sql
    subversion/branches/inheritable-props/subversion/libsvn_wc/wc_db.c

Modified: 
subversion/branches/inheritable-props/subversion/libsvn_wc/wc-queries.sql
URL: 
http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_wc/wc-queries.sql?rev=1381613&r1=1381612&r2=1381613&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_wc/wc-queries.sql 
(original)
+++ subversion/branches/inheritable-props/subversion/libsvn_wc/wc-queries.sql 
Thu Sep  6 14:20:09 2012
@@ -1516,17 +1516,20 @@ WHERE wc_id == ?1
 
 /* Queries for cached inherited properties. */
 
+/* Select the inherited properties of a single base node. */
 -- STMT_SELECT_IPROPS
 SELECT inherited_props FROM nodes
 WHERE wc_id = ?1
   AND local_relpath = ?2
-  AND op_depth = ?3
+  AND op_depth = 0
 
+/* Update the inherited properties of a single base node. */
 -- STMT_UPDATE_IPROP
 UPDATE nodes
 SET inherited_props = ?3
 WHERE (wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0)
 
+/* Select a single path if its base node has cached inherited properties. */
 -- STMT_SELECT_INODES
 SELECT local_relpath FROM nodes
 WHERE wc_id = ?1
@@ -1534,6 +1537,8 @@ WHERE wc_id = ?1
   AND op_depth = 0
   AND (inherited_props not null)
 
+/* Select all paths whose base nodes at or below a given path, which
+   have cached inherited properties. */
 -- STMT_SELECT_INODES_RECURSIVE
 SELECT local_relpath FROM nodes
 WHERE wc_id = ?1

Modified: subversion/branches/inheritable-props/subversion/libsvn_wc/wc_db.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_wc/wc_db.c?rev=1381613&r1=1381612&r2=1381613&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_wc/wc_db.c 
(original)
+++ subversion/branches/inheritable-props/subversion/libsvn_wc/wc_db.c Thu Sep  
6 14:20:09 2012
@@ -9315,8 +9315,7 @@ svn_wc__db_read_cached_iprops(apr_array_
       SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                         STMT_SELECT_IPROPS));
       SVN_ERR(op_depth_of(&op_depth, wcroot, local_relpath));
-      SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id, local_relpath,
-                                0));
+      SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
       SVN_ERR(svn_sqlite__step(&have_row, stmt));
 
       if (!have_row)


Reply via email to