diff options
Diffstat (limited to 'sonar-application')
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 { |