subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmpil...@apache.org
Subject svn commit: r1354014 - in /subversion/trunk/subversion: libsvn_wc/wc-metadata.sql tests/libsvn_wc/wc-queries-test.c
Date Tue, 26 Jun 2012 13:41:13 GMT
Author: cmpilato
Date: Tue Jun 26 13:41:12 2012
New Revision: 1354014

URL: http://svn.apache.org/viewvc?rev=1354014&view=rev
Log:
Following up on r1353676, introduce an index on the md5 checksum in the pristine
table.

* subversion/tests/libsvn_wc/wc-queries-test.c
  (slow_statements): Remove STMT_SELECT_PRISTINE_BY_MD5, as this now
    uses an index.

* subversion/tests/libsvn_wc/wc-queries-test.c
  (STMT_CREATE_SCHEMA): Add new index for new wc.db instances.
  (STMT_UPGRADE_TO_30): Add new index if it doesn't exist yet on the
    future bump to format 30.

Patch by: rhuijben

Modified:
    subversion/trunk/subversion/libsvn_wc/wc-metadata.sql
    subversion/trunk/subversion/tests/libsvn_wc/wc-queries-test.c

Modified: subversion/trunk/subversion/libsvn_wc/wc-metadata.sql
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-metadata.sql?rev=1354014&r1=1354013&r2=1354014&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-metadata.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-metadata.sql Tue Jun 26 13:41:12 2012
@@ -107,7 +107,8 @@ CREATE TABLE PRISTINE (
   md5_checksum  TEXT NOT NULL
   );
 
-
+CREATE INDEX I_PRISTINE_MD5 ON PRISTINE (md5_checksum);
+  
 /* ------------------------------------------------------------------------- */
 
 /* The ACTUAL_NODE table describes text changes and property changes
@@ -778,6 +779,8 @@ PRAGMA user_version = 29;
 CREATE UNIQUE INDEX IF NOT EXISTS I_NODES_MOVED
 ON NODES (wc_id, moved_to, op_depth);
 
+CREATE INDEX IF NOT EXISTS I_PRISTINE_MD5 ON PRISTINE (md5_checksum);
+
 /* Just to be sure clear out file external skels from pre 1.7.0 development
    working copies that were never updated by 1.7.0+ style clients */
 UPDATE nodes SET file_external=1 WHERE file_external IS NOT NULL;

Modified: subversion/trunk/subversion/tests/libsvn_wc/wc-queries-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_wc/wc-queries-test.c?rev=1354014&r1=1354013&r2=1354014&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/wc-queries-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/wc-queries-test.c Tue Jun 26 13:41:12 2012
@@ -88,9 +88,6 @@ static const int slow_statements[] =
   STMT_LOOK_FOR_WORK,
   STMT_HAS_WORKING_NODES,
 
-  /* Need index? */
-  STMT_SELECT_PRISTINE_BY_MD5, /* Only used by deprecated api */
-
   /* Full temporary table read */
   STMT_INSERT_ACTUAL_EMPTIES,
   STMT_SELECT_REVERT_LIST_RECURSIVE,



Mime
View raw message