aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-application
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2014-10-14 10:16:08 +0200
committerJulien Lancelot <julien.lancelot@sonarsource.com>2014-10-14 10:16:08 +0200
commitbb621a7a349ddf4568d3ab592fe5a40d0297e6be (patch)
tree0cf7ab245cb6487b134be7a93e6c5452730a10b2 /sonar-application
parentd65c9957139e4b0da94f5cf797dfe98cfd62ce77 (diff)
parent3ac8de59552f3d38f9b952079cbffa8572840731 (diff)
downloadsonarqube-bb621a7a349ddf4568d3ab592fe5a40d0297e6be.tar.gz
sonarqube-bb621a7a349ddf4568d3ab592fe5a40d0297e6be.zip
Merge remote-tracking branch 'origin/branch-4.5'
Conflicts: plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/XooPlugin.java sonar-application/src/main/assembly/conf/sonar.properties sonar-application/src/test/java/org/sonar/application/JdbcSettingsTest.java sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql
Diffstat (limited to 'sonar-application')
-rw-r--r--sonar-application/src/main/assembly/conf/sonar.properties2
-rw-r--r--sonar-application/src/main/java/org/sonar/application/JdbcSettings.java1
-rw-r--r--sonar-application/src/test/java/org/sonar/application/JdbcSettingsTest.java4
3 files changed, 4 insertions, 3 deletions
diff --git a/sonar-application/src/main/assembly/conf/sonar.properties b/sonar-application/src/main/assembly/conf/sonar.properties
index b9bee4266e5..0c70358e1c1 100644
--- a/sonar-application/src/main/assembly/conf/sonar.properties
+++ b/sonar-application/src/main/assembly/conf/sonar.properties
@@ -28,7 +28,7 @@
#----- MySQL 5.x
-#sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useCursorFetch=true&useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
+#sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useCursorFetch=true
#----- Oracle 10g/11g
diff --git a/sonar-application/src/main/java/org/sonar/application/JdbcSettings.java b/sonar-application/src/main/java/org/sonar/application/JdbcSettings.java
index 4a34e55a642..b2f36dbb6c0 100644
--- a/sonar-application/src/main/java/org/sonar/application/JdbcSettings.java
+++ b/sonar-application/src/main/java/org/sonar/application/JdbcSettings.java
@@ -95,6 +95,7 @@ public class JdbcSettings {
if (Provider.MYSQL.equals(provider)) {
checkRequiredParameter(url, "useUnicode=true");
checkRequiredParameter(url, "characterEncoding=utf8");
+ checkRequiredParameter(url, "useCursorFetch=true");
checkRecommendedParameter(url, "rewriteBatchedStatements=true");
checkRecommendedParameter(url, "useConfigs=maxPerformance");
}
diff --git a/sonar-application/src/test/java/org/sonar/application/JdbcSettingsTest.java b/sonar-application/src/test/java/org/sonar/application/JdbcSettingsTest.java
index 5a2708ab5c8..d6fd2af70e2 100644
--- a/sonar-application/src/test/java/org/sonar/application/JdbcSettingsTest.java
+++ b/sonar-application/src/test/java/org/sonar/application/JdbcSettingsTest.java
@@ -65,11 +65,11 @@ public class JdbcSettingsTest {
// minimal -> ok
settings.checkUrlParameters(JdbcSettings.Provider.MYSQL,
- "jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8");
+ "jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&useCursorFetch=true");
// full -> ok
settings.checkUrlParameters(JdbcSettings.Provider.MYSQL,
- "jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance");
+ "jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useCursorFetch=true");
// missing required -> ko
try {