subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@apache.org
Subject svn commit: r1124707 - in /subversion/trunk/subversion/libsvn_wc: wc-queries.sql wc_db.c
Date Thu, 19 May 2011 12:23:23 GMT
Author: gstein
Date: Thu May 19 12:23:23 2011
New Revision: 1124707

URL: http://svn.apache.org/viewvc?rev=1124707&view=rev
Log:
Add a LIMIT to a query and rename it for clarity.

* subversion/libsvn_wc/wc-queries.sql:
  (STMT_SELECT_ACTUAL_CHILDREN): renamed to ...
  (STMT_ACTUAL_HAS_CHILDREN): ... this. add a LIMIT 1.

* subversion/libsvn_wc/wc_db.c:
  (op_revert_txn): tweak a couple comments. track STMT rename.

Modified:
    subversion/trunk/subversion/libsvn_wc/wc-queries.sql
    subversion/trunk/subversion/libsvn_wc/wc_db.c

Modified: subversion/trunk/subversion/libsvn_wc/wc-queries.sql
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-queries.sql?rev=1124707&r1=1124706&r2=1124707&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Thu May 19 12:23:23 2011
@@ -883,8 +883,10 @@ WHERE wc_id = ?1 AND local_relpath = ?2 
 UPDATE nodes SET repos_id = ?3, repos_path = ?4
 WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0
 
--- STMT_SELECT_ACTUAL_CHILDREN
-SELECT 1 FROM actual_node WHERE wc_id = ?1 AND parent_relpath = ?2
+-- STMT_ACTUAL_HAS_CHILDREN
+SELECT 1 FROM actual_node
+WHERE wc_id = ?1 AND parent_relpath = ?2
+LIMIT 1
 
 -- STMT_INSERT_EXTERNAL
 INSERT OR REPLACE INTO externals (

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1124707&r1=1124706&r2=1124707&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Thu May 19 12:23:23 2011
@@ -5397,6 +5397,7 @@ op_revert_txn(void *baton,
     {
       SVN_ERR(svn_sqlite__reset(stmt));
 
+      /* There was no NODE row, so attempt to delete an ACTUAL_NODE row.  */
       SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                         STMT_DELETE_ACTUAL_NODE));
       SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
@@ -5404,9 +5405,9 @@ op_revert_txn(void *baton,
       if (affected_rows)
         {
           /* Can't do non-recursive actual-only revert if actual-only
-             children exist */
+             children exist. Raise an error to cancel the transaction.  */
           SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
-                                            STMT_SELECT_ACTUAL_CHILDREN));
+                                            STMT_ACTUAL_HAS_CHILDREN));
           SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
           SVN_ERR(svn_sqlite__step(&have_row, stmt));
           SVN_ERR(svn_sqlite__reset(stmt));



Mime
View raw message