]> source.dussan.org Git - sonarqube.git/commitdiff
Fix SQL inner join on MSSQL
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 28 Jun 2016 11:56:16 +0000 (13:56 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 28 Jun 2016 11:56:16 +0000 (13:56 +0200)
sonar-db/src/main/resources/org/sonar/db/measure/MeasureMapper.xml

index 6641363bf0ebb61282dbcd737ba481475513f12c..c256b0b34c7ae540175b2e2075dfa0fa7dc3f96c 100644 (file)
     select
     <include refid="measureColumns"/>
     from project_measures pm
-    inner join snapshots s
+    inner join snapshots s on s.id = pm.snapshot_id
     where
-    s.id=pm.snapshot_id
-    and pm.component_uuid in
+    pm.component_uuid in
     <foreach item="componentUuid" collection="query.getComponentUuids()" open="(" separator="," close=")">
       #{componentUuid}
     </foreach>
     select
     <include refid="measureColumns"/>
     from project_measures pm
-    inner join snapshots s
+    inner join snapshots s on s.id = pm.snapshot_id
     where
-    s.id=pm.snapshot_id
-    and s.islast=${_true}
+    s.islast=${_true}
     and pm.component_uuid in
     <foreach item="componentUuid" collection="componentUuids" open="(" separator="," close=")">#{componentUuid}
     </foreach>