Author: rhuijben
Date: Thu May 12 15:16:20 2011
New Revision: 1102342
URL: http://svn.apache.org/viewvc?rev=1102342&view=rev
Log:
Stop copying values that should not be set from BASE to a new base-deleted
record in working by specializing a query for its only caller.
(This also avoids updating checksums in the PRISTINE table).
* subversion/libsvn_wc/wc-queries.sql
(STMT_INSERT_WORKING_NODE_FROM_BASE_COPY_PRESENCE): Rename to ...
(STMT_INSERT_WORKING_DELETE_FROM_BASE): ... this and do just what is
necessary to insert a clean base-deleted row.
* subversion/libsvn_wc/wc_db.c
(insert_base_node,
make_copy_txn): Update user.
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=1102342&r1=1102341&r2=1102342&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Thu May 12 15:16:20
2011
@@ -703,16 +703,11 @@ SELECT wc_id, local_relpath, ?3 /*op_dep
FROM nodes
WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0
--- STMT_INSERT_WORKING_NODE_FROM_BASE_COPY_PRESENCE
+-- STMT_INSERT_DELETE_FROM_BASE
INSERT INTO nodes (
- wc_id, local_relpath, op_depth, parent_relpath, repos_id, repos_path,
- revision, presence, depth, kind, changed_revision, changed_date,
- changed_author, checksum, properties, translated_size, last_mod_time,
- symlink_target )
-SELECT wc_id, local_relpath, ?3 /*op_depth*/, parent_relpath, repos_id,
- repos_path, revision, ?4 /*presence*/, depth, kind, changed_revision,
- changed_date, changed_author, checksum, properties, translated_size,
- last_mod_time, symlink_target
+ wc_id, local_relpath, op_depth, parent_relpath, presence, kind)
+SELECT wc_id, local_relpath, ?3 /*op_depth*/, parent_relpath,
+ 'base-deleted', kind
FROM nodes
WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0
Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1102342&r1=1102341&r2=1102342&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Thu May 12 15:16:20 2011
@@ -899,11 +899,10 @@ insert_base_node(void *baton,
if (pibb->insert_base_deleted)
{
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
-
STMT_INSERT_WORKING_NODE_FROM_BASE_COPY_PRESENCE));
- SVN_ERR(svn_sqlite__bindf(stmt, "isit",
+ STMT_INSERT_DELETE_FROM_BASE));
+ SVN_ERR(svn_sqlite__bindf(stmt, "isi",
wcroot->wc_id, local_relpath,
- relpath_depth(local_relpath),
- presence_map, svn_wc__db_status_base_deleted));
+ relpath_depth(local_relpath)));
SVN_ERR(svn_sqlite__step_done(stmt));
}
@@ -11210,10 +11209,9 @@ make_copy_txn(void *baton,
if (add_working_base_deleted)
{
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
- STMT_INSERT_WORKING_NODE_FROM_BASE_COPY_PRESENCE));
- SVN_ERR(svn_sqlite__bindf(stmt, "isit", wcroot->wc_id, local_relpath,
- mcb->op_depth, presence_map,
- svn_wc__db_status_base_deleted));
+ STMT_INSERT_DELETE_FROM_BASE));
+ SVN_ERR(svn_sqlite__bindf(stmt, "isi", wcroot->wc_id, local_relpath,
+ mcb->op_depth));
SVN_ERR(svn_sqlite__step_done(stmt));
}
else