Bläddra i källkod

SONAR-12246 Remove SQL requests specific to MySQL

tags/8.0
Simon Brandhof 5 år sedan
förälder
incheckning
5b6b842644

+ 0
- 3
server/sonar-db-dao/src/main/resources/org/sonar/db/component/ComponentMapper.xml Visa fil

@@ -213,9 +213,6 @@
<when test="_databaseId == 'mssql'">
p.module_uuid_path LIKE module.module_uuid_path + '%'
</when>
<when test="_databaseId == 'mysql'">
p.module_uuid_path LIKE concat(module.module_uuid_path, '%')
</when>
<otherwise>
p.module_uuid_path LIKE module.module_uuid_path || '%'
</otherwise>

+ 0
- 11
server/sonar-db-dao/src/main/resources/org/sonar/db/measure/LiveMeasureMapper.xml Visa fil

@@ -149,17 +149,6 @@
<include refid="sql_deleteByComponentUuidExcludingMetricIds"/>
</delete>

<!--
best practice on MySQL : order the rows to be locked in order
to minimize risk of deadlock.
https://stackoverflow.com/a/2423921/229031
https://jira.sonarsource.com/browse/SONAR-10117?focusedCommentId=153555&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-153555
-->
<delete id="deleteByComponentUuidExcludingMetricIds" parameterType="map" databaseId="mysql">
<include refid="sql_deleteByComponentUuidExcludingMetricIds"/>
order by uuid
</delete>

<sql id="sql_deleteByComponentUuidExcludingMetricIds">
delete from live_measures
where

+ 0
- 8
server/sonar-db-dao/src/main/resources/org/sonar/db/purge/PurgeMapper.xml Visa fil

@@ -310,14 +310,6 @@
issues.project_uuid = #{projectUuid,jdbcType=VARCHAR}
</delete>

<!-- Mysql -->
<delete id="deleteIssueChangesByProjectUuid" databaseId="mysql" parameterType="map">
delete ic from issue_changes as ic, issues as i
where
ic.issue_key=i.kee
and i.component_uuid = #{projectUuid,jdbcType=VARCHAR}
</delete>

<delete id="deleteIssuesByProjectUuid" parameterType="map">
delete from issues
where project_uuid = #{projectUuid,jdbcType=VARCHAR}

Laddar…
Avbryt
Spara