Author: ehu
Date: Sun Sep 5 19:29:18 2010
New Revision: 992873
URL: http://svn.apache.org/viewvc?rev=992873&view=rev
Log:
Convert another query to NODE_DATA.
* subversion/libsvn_wc/wc-queries.sql
(STMT_APPLY_CHANGES_TO_BASE_NODE_DATA): New query.
* subversion/libsvn_wc/wc_db.c (commit_node): Use new query inside
SVN_WC__NODE_DATA block.
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=992873&r1=992872&r2=992873&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Sun Sep 5 19:29:18
2010
@@ -495,6 +495,13 @@ INSERT OR REPLACE INTO BASE_NODE (
depth, symlink_target, dav_cache)
VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10, ?11, ?12, ?13, ?14, ?15, ?16);
+-- STMT_APPLY_CHANGES_TO_BASE_NODE_DATA
+INSERT OR REPLACE INTO NODE_DATA (
+ wc_id, local_relpath, op_depth, parent_relpath, presence, kind,
+ changed_revision, changed_author, properties, checksum,
+ changed_date, depth, symlink_target)
+VALUES (?1, ?2, 0, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10, ?11, ?12);
+
-- STMT_INSERT_WORKING_NODE_FROM_BASE_NODE
INSERT INTO WORKING_NODE (
wc_id, local_relpath, parent_relpath, presence, kind, checksum,
Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=992873&r1=992872&r2=992873&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Sun Sep 5 19:29:18 2010
@@ -6040,6 +6040,33 @@ commit_node(void *baton, svn_sqlite__db_
SVN_ERR(svn_sqlite__step_done(stmt));
+#ifdef SVN_WC__NODE_DATA
+
+ SVN_ERR(svn_sqlite__get_statement(&stmt, cb->pdh->wcroot->sdb,
+ STMT_APPLY_CHANGES_TO_BASE_NODE_DATA));
+ SVN_ERR(svn_sqlite__bindf(stmt, "issttisb",
+ cb->pdh->wcroot->wc_id, cb->local_relpath,
+ parent_relpath,
+ presence_map, new_presence,
+ kind_map, new_kind,
+ (apr_int64_t)cb->changed_rev,
+ cb->changed_author,
+ prop_blob.data, prop_blob.len));
+
+ SVN_ERR(svn_sqlite__bind_checksum(stmt, 9, cb->new_checksum,
+ scratch_pool));
+ if (cb->changed_date > 0)
+ SVN_ERR(svn_sqlite__bind_int64(stmt, 10, cb->changed_date));
+ SVN_ERR(svn_sqlite__bind_text(stmt, 11, new_depth_str));
+ /* ### 12. target. */
+ SVN_ERR(svn_sqlite__bind_properties(stmt, 12, cb->new_dav_cache,
+ scratch_pool));
+
+ SVN_ERR(svn_sqlite__step_done(stmt));
+
+#endif
+
+
if (have_work)
{
/* Get rid of the WORKING_NODE row. */