aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-db/src/main/resources/org/sonar/db
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-db/src/main/resources/org/sonar/db')
-rw-r--r--sonar-db/src/main/resources/org/sonar/db/component/ComponentMapper.xml13
1 files changed, 9 insertions, 4 deletions
diff --git a/sonar-db/src/main/resources/org/sonar/db/component/ComponentMapper.xml b/sonar-db/src/main/resources/org/sonar/db/component/ComponentMapper.xml
index a9d12f01871..92c23601b28 100644
--- a/sonar-db/src/main/resources/org/sonar/db/component/ComponentMapper.xml
+++ b/sonar-db/src/main/resources/org/sonar/db/component/ComponentMapper.xml
@@ -414,11 +414,16 @@
</if>
</sql>
- <select id="selectAll" parameterType="map" resultType="Component">
- select distinct
- <include refid="componentColumns"/>
+ <select id="selectForIndexing" parameterType="map" resultType="Component">
+ select
+ <include refid="componentColumns"/>
from projects p
- where p.enabled=${_true}
+ where
+ p.enabled=${_true}
+ and p.copy_component_uuid is null
+ <if test="projectUuid != null">
+ and p.project_uuid=#{projectUuid}
+ </if>
</select>
<insert id="insert" parameterType="Component" keyColumn="id" useGeneratedKeys="true" keyProperty="id">