You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2012/05/23 17:26:13 UTC

svn commit: r1341893 - in /subversion/trunk/subversion/libsvn_wc: wc-queries.sql wc_db.c

Author: rhuijben
Date: Wed May 23 15:26:13 2012
New Revision: 1341893

URL: http://svn.apache.org/viewvc?rev=1341893&view=rev
Log:
Separate the changelist table create script from the creation of a trigger on
actual_nodes, to avoid side effects when testing in wc-queries-test.c.

As this code is only evaluated within a lock, there is no
measurable performance impact of this split.

* subversion/libsvn_wc/wc-queries.sql
  (STMT_CREATE_CHANGELIST_LIST): Separate last part of this schema to...
  (STMT_CREATE_CHANGELIST_TRIGGER): ... this. To make sure we don't create
    unexpected triggers on common tables in the wc-queries-test.

* subversion/libsvn_wc/wc_db.c
  (set_changelist_txn): Add second call to svn_sqlite__exec_statements, to
    keep the original behavior.

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=1341893&r1=1341892&r2=1341893&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-queries.sql Wed May 23 15:26:13 2012
@@ -404,11 +404,13 @@ CREATE TEMPORARY TABLE changelist_list (
   notify INTEGER NOT NULL,
   changelist TEXT NOT NULL,
   PRIMARY KEY (wc_id, local_relpath, notify)
-);
+)
+
 /* Create notify items for when a node is removed from a changelist and
    when a node is added to a changelist. Make sure nothing is notified
    if there were no changes.
 */
+-- STMT_CREATE_CHANGELIST_TRIGGER
 DROP TRIGGER IF EXISTS   trigger_changelist_list_change;
 CREATE TEMPORARY TRIGGER trigger_changelist_list_change
 BEFORE UPDATE ON actual_node

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1341893&r1=1341892&r2=1341893&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Wed May 23 15:26:13 2012
@@ -5085,6 +5085,8 @@ set_changelist_txn(void *baton,
   /* Now create our notification table. */
   SVN_ERR(svn_sqlite__exec_statements(wcroot->sdb,
                                       STMT_CREATE_CHANGELIST_LIST));
+  SVN_ERR(svn_sqlite__exec_statements(wcroot->sdb,
+                                      STMT_CREATE_CHANGELIST_TRIGGER));
 
   /* Update our changelists. */
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,