diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-10-23 15:30:35 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-10-23 15:30:35 +0200 |
commit | e75113a934bafe5b075d976650c5d72ebe1a78ff (patch) | |
tree | 75f465e1c9104cd1914450fd8bfd28c83642ac45 /sonar-application/src | |
parent | a5a4d6833c2a57aadae39b76f10036ad472decb9 (diff) | |
download | sonarqube-e75113a934bafe5b075d976650c5d72ebe1a78ff.tar.gz sonarqube-e75113a934bafe5b075d976650c5d72ebe1a78ff.zip |
Revert "Revert "SONAR-5605 MySQL: configure driver to use server side cursor and not client side cursor""
This reverts commit cbd911bcb1bc40510fdf56639ef7476612bec24c.
Conflicts:
sonar-application/src/test/java/org/sonar/application/JdbcSettingsTest.java
Diffstat (limited to 'sonar-application/src')
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 4c720ee9982..064e2beafac 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 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 { |