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");
}
@Test
public void check_mysql_parameters() throws Exception {
- Props props = new Props(new Properties());
-
// minimal -> ok
settings.checkUrlParameters(JdbcSettings.Provider.MYSQL,
- "jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&useCursorFetch=true");
+ "jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8");
// full -> ok
settings.checkUrlParameters(JdbcSettings.Provider.MYSQL,
- "jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useCursorFetch=true");
+ "jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance");
// missing required -> ko
try {