aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2014-10-17 08:29:01 +0200
committerJulien Lancelot <julien.lancelot@sonarsource.com>2014-10-17 08:29:01 +0200
commitcbd911bcb1bc40510fdf56639ef7476612bec24c (patch)
tree9122f35efe54210dd3f46212fb7e14235caa117f /server
parenta153fa1d04a472d3b323d56bc628b1a3370e4a43 (diff)
downloadsonarqube-cbd911bcb1bc40510fdf56639ef7476612bec24c.tar.gz
sonarqube-cbd911bcb1bc40510fdf56639ef7476612bec24c.zip
Revert "SONAR-5605 MySQL: configure driver to use server side cursor and not client side cursor"
This reverts commit ccf4726ae0530695bd55903a989bbd6afae1dd5c.
Diffstat (limited to 'server')
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/db/migrations/SelectImpl.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/SelectImpl.java b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/SelectImpl.java
index d0724aaa813..b49fc88edee 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/SelectImpl.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/SelectImpl.java
@@ -21,6 +21,7 @@ package org.sonar.server.db.migrations;
import org.apache.commons.dbutils.DbUtils;
import org.sonar.core.persistence.Database;
+import org.sonar.core.persistence.dialect.MySql;
import java.sql.Connection;
import java.sql.PreparedStatement;
@@ -82,7 +83,11 @@ class SelectImpl extends BaseSqlStatement<Select> implements Select {
static SelectImpl create(Database db, Connection connection, String sql) throws SQLException {
PreparedStatement pstmt = connection.prepareStatement(sql, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
- pstmt.setFetchSize(1000);
+ if (db.getDialect().getId().equals(MySql.ID)) {
+ pstmt.setFetchSize(Integer.MIN_VALUE);
+ } else {
+ pstmt.setFetchSize(1000);
+ }
return new SelectImpl(pstmt);
}
}