aboutsummaryrefslogtreecommitdiffstats
path: root/subversion/libsvn_wc/wc-queries.sql
diff options
context:
space:
mode:
Diffstat (limited to 'subversion/libsvn_wc/wc-queries.sql')
-rw-r--r--subversion/libsvn_wc/wc-queries.sql24
1 files changed, 23 insertions, 1 deletions
diff --git a/subversion/libsvn_wc/wc-queries.sql b/subversion/libsvn_wc/wc-queries.sql
index 86cf9216a058..962e57dc16c2 100644
--- a/subversion/libsvn_wc/wc-queries.sql
+++ b/subversion/libsvn_wc/wc-queries.sql
@@ -117,6 +117,17 @@ WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth < ?3
ORDER BY op_depth DESC
LIMIT 1
+-- STMT_SELECT_PRESENT_HIGHEST_WORKING_NODES_BY_BASENAME_AND_KIND
+SELECT presence, local_relpath
+FROM nodes n
+WHERE wc_id = ?1 AND local_relpath = RELPATH_JOIN(parent_relpath, ?2)
+ AND kind = ?3
+ AND presence in (MAP_NORMAL, MAP_INCOMPLETE)
+ AND op_depth = (SELECT MAX(op_depth)
+ FROM NODES w
+ WHERE w.wc_id = ?1
+ AND w.local_relpath = n.local_relpath)
+
-- STMT_SELECT_ACTUAL_NODE
SELECT changelist, properties, conflict_data
FROM actual_node
@@ -249,7 +260,7 @@ WHERE wc_id = ?1 AND IS_STRICT_DESCENDANT_OF(local_relpath, ?2)
-- STMT_DELETE_BASE_RECURSIVE
DELETE FROM nodes
-WHERE wc_id = ?1 AND (local_relpath = ?2
+WHERE wc_id = ?1 AND (local_relpath = ?2
OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
AND op_depth = 0
@@ -1785,6 +1796,17 @@ WHERE wc_id = ?1
SELECT 1 FROM sqlite_master WHERE name='sqlite_stat1' AND type='table'
LIMIT 1
+-- STMT_SELECT_COPIES_OF_REPOS_RELPATH
+SELECT local_relpath
+FROM nodes n
+WHERE wc_id = ?1 AND repos_path = ?2 AND kind = ?3
+ AND presence = MAP_NORMAL
+ AND op_depth = (SELECT MAX(op_depth)
+ FROM NODES w
+ WHERE w.wc_id = ?1
+ AND w.local_relpath = n.local_relpath)
+ORDER BY local_relpath ASC
+
/* ------------------------------------------------------------------------- */
/* Grab all the statements related to the schema. */