From: Simon Brandhof Date: Tue, 28 Jun 2016 07:35:02 +0000 (+0200) Subject: Fix SQL request for MSSQL and Postgres X-Git-Tag: 6.0-RC1~246 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=983b3c4a62c4541bbc0bab5d96c43f55efa52100;p=sonarqube.git Fix SQL request for MSSQL and Postgres --- 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 49646233f04..31b71fecbab 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 @@ -322,10 +322,9 @@ select from projects base - inner join projects p + inner join projects p on p.project_uuid = base.project_uuid where base.uuid = #{query.baseUuid} - and p.project_uuid = base.project_uuid and base.uuid_path like #{baseUuidPathLike} and p.uuid != base.uuid and p.enabled = ${_true} @@ -347,12 +346,10 @@ from projects p - inner join projects base - inner join snapshots s + inner join projects base on base.project_uuid = p.project_uuid + inner join snapshots s on s.component_uuid = base.project_uuid where base.uuid = #{query.baseUuid} - and base.project_uuid = p.project_uuid - and s.component_uuid = base.project_uuid and p.enabled = ${_true} and s.islast = ${_true} and p.uuid_path = #{baseUuidPath} @@ -400,14 +397,12 @@ from projects p - inner join projects base - inner join snapshots s + inner join projects base on base.project_uuid=p.project_uuid + inner join snapshots s on s.component_uuid = base.project_uuid where base.uuid = #{query.baseUuid} - and base.project_uuid=p.project_uuid and p.enabled = ${_true} and p.uuid_path like #{baseUuidPathLike} ESCAPE '/' - and s.component_uuid = base.project_uuid and s.islast = ${_true}