diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-10-10 08:59:32 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-10-10 10:23:33 +0200 |
commit | ccf4726ae0530695bd55903a989bbd6afae1dd5c (patch) | |
tree | 15fe0521eeaa7162f38efb7851047eecdf130496 /sonar-application | |
parent | a2e88db394ecb5ceba9c01e87612de7e2c5e5cf1 (diff) | |
download | sonarqube-ccf4726ae0530695bd55903a989bbd6afae1dd5c.tar.gz sonarqube-ccf4726ae0530695bd55903a989bbd6afae1dd5c.zip |
SONAR-5605 MySQL: configure driver to use server side cursor and not client side cursor
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 e3477959f1b..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?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 20e32cacd02..2ce07111978 100644 --- a/sonar-application/src/main/java/org/sonar/application/JdbcSettings.java +++ b/sonar-application/src/main/java/org/sonar/application/JdbcSettings.java @@ -98,6 +98,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 ad603c4e453..e1cdeffa94e 100644 --- a/sonar-application/src/test/java/org/sonar/application/JdbcSettingsTest.java +++ b/sonar-application/src/test/java/org/sonar/application/JdbcSettingsTest.java @@ -64,11 +64,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 { |