aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-testing-harness
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2011-09-01 19:06:46 +0400
committerEvgeny Mandrikov <mandrikov@gmail.com>2011-09-02 00:16:21 +0400
commit5ff8c8c74e58a9df51be059908a064a43a67c50d (patch)
tree557856493faeb208510a056b1d665f838f907402 /sonar-testing-harness
parentd76c641b9f6ad77d26f1bc80f850ed3b2496a91d (diff)
downloadsonarqube-5ff8c8c74e58a9df51be059908a064a43a67c50d.tar.gz
sonarqube-5ff8c8c74e58a9df51be059908a064a43a67c50d.zip
SONAR-1091 CPD over different projects
* Improve table clone_blocks and so DbCloneIndex. * Add purge of old clone blocks.
Diffstat (limited to 'sonar-testing-harness')
-rw-r--r--sonar-testing-harness/src/main/resources/org/sonar/test/persistence/sonar-test.ddl5
1 files changed, 3 insertions, 2 deletions
diff --git a/sonar-testing-harness/src/main/resources/org/sonar/test/persistence/sonar-test.ddl b/sonar-testing-harness/src/main/resources/org/sonar/test/persistence/sonar-test.ddl
index 1c8c3eb23fe..7ebfd7cdd4e 100644
--- a/sonar-testing-harness/src/main/resources/org/sonar/test/persistence/sonar-test.ddl
+++ b/sonar-testing-harness/src/main/resources/org/sonar/test/persistence/sonar-test.ddl
@@ -489,12 +489,13 @@ CREATE TABLE REVIEW_COMMENTS (
);
CREATE TABLE CLONE_BLOCKS (
+ PROJECT_SNAPSHOT_ID INTEGER,
SNAPSHOT_ID INTEGER,
HASH VARCHAR(50),
- RESOURCE_KEY VARCHAR(400),
INDEX_IN_FILE INTEGER NOT NULL,
START_LINE INTEGER NOT NULL,
END_LINE INTEGER NOT NULL
);
+CREATE INDEX CLONE_BLOCKS_PROJECT_SNAPSHOT ON CLONE_BLOCKS (PROJECT_SNAPSHOT_ID);
+CREATE INDEX CLONE_BLOCKS_SNAPSHOT ON CLONE_BLOCKS (SNAPSHOT_ID);
CREATE INDEX CLONE_BLOCKS_HASH ON CLONE_BLOCKS (HASH);
-CREATE INDEX CLONE_BLOCKS_RESOURCE ON CLONE_BLOCKS (SNAPSHOT_ID, RESOURCE_KEY);