Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-05-30 13:56:01 -0400
committerEike Stepper2013-05-30 13:56:01 -0400
commitdbd2007e12642d7d20f30dd6d90d50305d098a26 (patch)
tree6371ca7702d914eb7a8c1a208d43bab86e0c108f
parent80e6eb89d75942c84230134256fb02d903c1f2c8 (diff)
downloadcdo-dbd2007e12642d7d20f30dd6d90d50305d098a26.tar.gz
cdo-dbd2007e12642d7d20f30dd6d90d50305d098a26.tar.xz
cdo-dbd2007e12642d7d20f30dd6d90d50305d098a26.zip
Avoid unnecessary stmt.getMaxRows() calls
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AbstractListTableMapping.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AbstractListTableMapping.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AbstractListTableMapping.java
index f289912414..25877cfd26 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AbstractListTableMapping.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AbstractListTableMapping.java
@@ -244,8 +244,18 @@ public abstract class AbstractListTableMapping extends AbstractBasicListTableMap
if (listChunk != CDORevision.UNCHUNKED)
{
+ if (stmt.getMaxRows() != listChunk)
+ {
stmt.setMaxRows(listChunk); // optimization - don't read unneeded rows.
}
+ }
+ else
+ {
+ if (stmt.getMaxRows() != 0)
+ {
+ stmt.setMaxRows(0);
+ }
+ }
resultSet = stmt.executeQuery();

Back to the top