db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1440656 - in /db/derby/code/trunk/java: client/org/apache/derby/client/am/ engine/org/apache/derby/iapi/jdbc/ engine/org/apache/derby/iapi/sql/ engine/org/apache/derby/impl/jdbc/ engine/org/apache/derby/impl/sql/ engine/org/apache/derby/im...
Date Wed, 30 Jan 2013 20:35:56 GMT
Author: rhillegas
Date: Wed Jan 30 20:35:56 2013
New Revision: 1440656

URL: http://svn.apache.org/viewvc?rev=1440656&view=rev
Log:
DERBY-6000: Add JDBC 4.2 large max rows methods to Derby's embedded and client implementations
of java.sql.Statement.

Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalStatementEntity.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EngineStatement.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/Activation.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericActivationHolder.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BaseActivation.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementTest.java

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java?rev=1440656&r1=1440655&r2=1440656&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java Wed Jan 30 20:35:56
2013
@@ -82,7 +82,7 @@ public abstract class Cursor {
 
     // Total number of rows read so far.
     // This should never exceed this.statement.maxRows
-    int rowsRead_;
+    long rowsRead_;
 
     // Maximum column size limit in bytes.
     int maxFieldSize_ = 0;

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalStatementEntity.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalStatementEntity.java?rev=1440656&r1=1440655&r2=1440656&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalStatementEntity.java
(original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalStatementEntity.java
Wed Jan 30 20:35:56 2013
@@ -307,5 +307,13 @@ abstract class LogicalStatementEntity
     {
         return ((org.apache.derby.client.am.Statement) getPhysStmt()).getLargeUpdateCount();
     }
+    public  long getLargeMaxRows() throws SQLException
+    {
+        return ((org.apache.derby.client.am.Statement) getPhysStmt()).getLargeMaxRows();
+    }
+    public  void    setLargeMaxRows(long maxRows) throws SQLException
+    {
+        ((org.apache.derby.client.am.Statement) getPhysStmt()).setLargeMaxRows( maxRows );
+    }
 
 }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java?rev=1440656&r1=1440655&r2=1440656&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ResultSet.java Wed Jan 30 20:35:56
2013
@@ -208,7 +208,7 @@ public abstract class ResultSet implemen
     
     // Keep maxRows in the ResultSet, so that changes to maxRow in the statement
     // do not affect the resultSet after it has been created
-    private int maxRows_;
+    private long maxRows_;
 
     /**
      * Indicates which columns have been fetched as a stream or as a LOB for a

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java?rev=1440656&r1=1440655&r2=1440656&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java Wed Jan 30 20:35:56
2013
@@ -28,6 +28,9 @@ import org.apache.derby.shared.common.sa
 
 public class Statement implements java.sql.Statement, StatementCallbackInterface{
 
+    /** For use in debugging setLargeMaxRows() method added by JDBC 4.2 */
+    public  static  long    fetchedRowBase = 0L;
+    
     //---------------------navigational members-----------------------------------
 
     public MaterialStatement materialStatement_ = null;
@@ -124,7 +127,7 @@ public class Statement implements java.s
     protected ArrayList<String> timeoutArrayList = new ArrayList<String>(1);
     protected boolean doWriteTimeout = false;
     int timeout_ = 0; // for query timeout in seconds
-    int maxRows_ = 0;
+    long maxRows_ = 0L;
     int maxFieldSize_ = 0; // zero means that there is no limit to the size of a column.
 
     // When this is false we skip autocommit for this PreparedStatement.
@@ -261,7 +264,7 @@ public class Statement implements java.s
         cursorName_ = null; // setCursorName
         timeout_ = 0; // setQueryTimeout
         doWriteTimeout = false; // setQueryTimeout
-        maxRows_ = 0; // setMaxRows
+        maxRows_ = 0L; // setMaxRows
         maxFieldSize_ = 0; // setMaxFieldSize
         fetchSize_ = 0; // setFetchSize
         fetchDirection_ = java.sql.ResultSet.FETCH_FORWARD; // setFetchDirection
@@ -722,11 +725,18 @@ public class Statement implements java.s
     }
 
     public int getMaxRows() throws SQLException {
+        if (agent_.loggingEnabled()) {
+            agent_.logWriter_.traceExit(this, "getMaxRows", maxRows_);
+        }
+        return (int) getLargeMaxRows();
+    }
+
+    public long getLargeMaxRows() throws SQLException {
         try
         {
             checkForClosedStatement();
             if (agent_.loggingEnabled()) {
-                agent_.logWriter_.traceExit(this, "getMaxRows", maxRows_);
+                agent_.logWriter_.traceExit(this, "getLargeMaxRows", maxRows_);
             }
             return maxRows_;
         }
@@ -737,11 +747,21 @@ public class Statement implements java.s
     }
 
     public void setMaxRows(int maxRows) throws SQLException {
+        synchronized (connection_) {
+            if (agent_.loggingEnabled()) {
+                agent_.logWriter_.traceEntry(this, "setMaxRows", maxRows);
+            }
+            setLargeMaxRows( maxRows );
+        }
+    }
+
+    // Added by JDBC 4.2
+    public void setLargeMaxRows(long maxRows) throws SQLException {
         try
         {
             synchronized (connection_) {
                 if (agent_.loggingEnabled()) {
-                    agent_.logWriter_.traceEntry(this, "setMaxRows", maxRows);
+                    agent_.logWriter_.traceEntry(this, "setLargeMaxRows", maxRows);
                 }
                 checkForClosedStatement(); // Per jdbc spec (see java.sql.Statement.close()
javadoc)
                 if (maxRows < 0) {
@@ -1644,7 +1664,7 @@ public class Statement implements java.s
             return;
         }
         openOnServer_ = true;
-        resultSet.cursor_.rowsRead_ = 0;
+        resultSet.cursor_.rowsRead_ = fetchedRowBase;
 
         // Set fetchSize_ to the default(64) if not set by the user if the resultset is scrollable.
         // This fetchSize_ is used to check for a complete rowset when rowsets are parsed.
@@ -1672,7 +1692,7 @@ public class Statement implements java.s
             return;
         }
         openOnServer_ = true;
-        resultSet.cursor_.rowsRead_ = 0;
+        resultSet.cursor_.rowsRead_ = fetchedRowBase;
 
         resultSet.generatedSection_ = generatedSection;
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement.java?rev=1440656&r1=1440655&r2=1440656&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement.java Wed
Jan 30 20:35:56 2013
@@ -644,9 +644,17 @@ public class BrokeredStatement implement
     {
         return ((EngineStatement) getStatement()).executeLargeUpdate( sql, columnNames );
     }
+    public  long getLargeMaxRows() throws SQLException
+    {
+        return ((EngineStatement) getStatement()).getLargeMaxRows();
+    }
     public  long getLargeUpdateCount() throws SQLException
     {
         return ((EngineStatement) getStatement()).getLargeUpdateCount();
     }
+    public  void setLargeMaxRows( long max ) throws SQLException
+    {
+        ((EngineStatement) getStatement()).setLargeMaxRows( max );
+    }
 
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EngineStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EngineStatement.java?rev=1440656&r1=1440655&r2=1440656&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EngineStatement.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EngineStatement.java Wed Jan
30 20:35:56 2013
@@ -72,6 +72,8 @@ public interface EngineStatement extends
     public  long executeLargeUpdate( String sql, int autoGeneratedKeys) throws SQLException;
     public  long executeLargeUpdate( String sql, int[] columnIndexes ) throws SQLException;
     public  long executeLargeUpdate( String sql, String[] columnNames ) throws SQLException;
+    public  long getLargeMaxRows() throws SQLException;
     public  long getLargeUpdateCount() throws SQLException;
+    public  void setLargeMaxRows( long max ) throws SQLException;
 
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/Activation.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/Activation.java?rev=1440656&r1=1440655&r2=1440656&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/Activation.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/Activation.java Wed Jan 30 20:35:56
2013
@@ -521,7 +521,7 @@ public interface Activation extends Depe
 	 *
 	 * @param maxRows Maximum # of rows. (0 means no limit.)
 	 */
-	public void setMaxRows(int maxRows);
+	public void setMaxRows(long maxRows);
 
 	/**
 	 * Get the maximum # of rows.  (# of rows that can
@@ -529,7 +529,7 @@ public interface Activation extends Depe
 	 *
 	 * @return Maximum # of rows.  (0 means no limit.)
 	 */
-	public int getMaxRows();
+	public long getMaxRows();
 
 	/**
 	 * Is this Activation for a cursor?

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java?rev=1440656&r1=1440655&r2=1440656&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java Wed Jan
30 20:35:56 2013
@@ -95,6 +95,9 @@ import org.apache.derby.iapi.util.Interr
 public class EmbedResultSet extends ConnectionChild
     implements EngineResultSet, Comparable {
 
+    /** For use in debugging setLargeMaxRows() method added by JDBC 4.2 */
+    public  static  long    fetchedRowBase = 0L;
+    
 	// cursor movement
 	protected static final int FIRST = 1;
 	protected static final int NEXT = 2;
@@ -150,7 +153,7 @@ public class EmbedResultSet extends Conn
 	private final ResultDescription resultDescription;
 
     // max rows limit for this result set
-    private int maxRows;
+    private long maxRows;
     // The Maximum field size limt set for this result set
     private final int maxFieldSize;
 
@@ -159,7 +162,7 @@ public class EmbedResultSet extends Conn
      * returned if the maxRows is set. The following varible is used
      * to keep the count of number of rows returned to the user.
      */
-    private int NumberofFetchedRows;
+    private long NumberofFetchedRows = fetchedRowBase;
 
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java?rev=1440656&r1=1440655&r2=1440656&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java Wed Jan
30 20:35:56 2013
@@ -109,7 +109,7 @@ public class EmbedStatement extends Conn
 	
 	// The maximum # of rows to return per result set.
 	// (0 means no limit.)
-	int maxRows;
+	long maxRows;
 
 	private ParameterValueSet pvs;
 
@@ -456,6 +456,22 @@ public class EmbedStatement extends Conn
      */
 	public int getMaxRows() throws SQLException 
 	{
+        return (int) getLargeMaxRows();
+	}
+
+    /**
+     * JDBC 4.2
+     *
+     * The maxRows limit is the maximum number of rows that a
+     * ResultSet can contain.  If the limit is exceeded, the excess
+     * rows are silently dropped. For use with
+     * statements which may touch more than Integer.MAX_VALUE rows.
+     *
+     * @return the current max row limit; zero means unlimited
+	 * @exception SQLException thrown on failure.
+     */
+	public long getLargeMaxRows() throws SQLException 
+	{
 		checkStatus();
 		return maxRows;
 	}
@@ -470,10 +486,23 @@ public class EmbedStatement extends Conn
      */
 	public void setMaxRows(int max) throws SQLException	
 	{
+        setLargeMaxRows( max );
+	}
+
+    /**
+     * The maxRows limit is set to limit the number of rows that any
+     * ResultSet can contain.  If the limit is exceeded, the excess
+     * rows are silently dropped.
+     *
+     * @param max the new max rows limit; zero means unlimited
+	 * @exception SQLException thrown on failure.
+     */
+	public void setLargeMaxRows(long max) throws SQLException	
+	{
 		checkStatus();
-		if (max < 0)
+		if (max < 0L)
 		{
-			throw newSQLException(SQLState.INVALID_MAX_ROWS_VALUE, new Integer(max));
+			throw newSQLException(SQLState.INVALID_MAX_ROWS_VALUE, new Long(max));
 		}
 		this.maxRows = max;
 	}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericActivationHolder.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericActivationHolder.java?rev=1440656&r1=1440655&r2=1440656&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericActivationHolder.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericActivationHolder.java
Wed Jan 30 20:35:56 2013
@@ -568,7 +568,7 @@ final public class GenericActivationHold
 	/**
 	 * @see Activation#setMaxRows
 	 */
-	public void setMaxRows(int maxRows)
+	public void setMaxRows(long maxRows)
 	{
 		ac.setMaxRows(maxRows);
 	}
@@ -576,7 +576,7 @@ final public class GenericActivationHold
 	/**
 	 * @see Activation#getMaxRows
 	 */
-	public int getMaxRows()
+	public long getMaxRows()
 	{
 		return ac.getMaxRows();
 	}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BaseActivation.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BaseActivation.java?rev=1440656&r1=1440655&r2=1440656&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BaseActivation.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BaseActivation.java
Wed Jan 30 20:35:56 2013
@@ -130,7 +130,7 @@ public abstract class BaseActivation imp
 
 	private TableDescriptor ddlTableDescriptor;
 
-	private int maxRows = -1;
+	private long maxRows = -1L;
 	private boolean			forCreateTable;
 
 	private boolean			scrollable;
@@ -1134,7 +1134,7 @@ public abstract class BaseActivation imp
 	/**
 	 * @see Activation#setMaxRows
 	 */
-	public void setMaxRows(int maxRows)
+	public void setMaxRows(long maxRows)
 	{
 		this.maxRows = maxRows;
 	}
@@ -1142,7 +1142,7 @@ public abstract class BaseActivation imp
 	/**
 	 * @see Activation#getMaxRows
 	 */
-	public int getMaxRows()
+	public long getMaxRows()
 	{
 		return maxRows;
 	}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java?rev=1440656&r1=1440655&r2=1440656&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java
Wed Jan 30 20:35:56 2013
@@ -107,7 +107,7 @@ public class ScrollInsensitiveResultSet 
 	public int numFromHashTable;
 	public int numToHashTable;
 
-	private int maxRows;
+	private long maxRows;
 
     private boolean keepAfterCommit;
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementTest.java?rev=1440656&r1=1440655&r2=1440656&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementTest.java
Wed Jan 30 20:35:56 2013
@@ -21,6 +21,7 @@
 package org.apache.derbyTesting.functionTests.tests.jdbc4;
 
 import org.apache.derby.vti.VTITemplate;
+import org.apache.derby.impl.jdbc.EmbedResultSet;
 import org.apache.derby.impl.sql.execute.RowUtil;
 
 import org.apache.derbyTesting.functionTests.tests.jdbcapi.Wrapper41Statement;
@@ -383,13 +384,15 @@ public class StatementTest
 
         largeBatchTest( sw, (long) Integer.MAX_VALUE );
         largeBatchTest( sw, 0L);
+
+        largeMaxRowsTest( sw,  ((long) Integer.MAX_VALUE) + 1L );
     }
     private static  void    largeUpdateTest( StatementWrapper sw, long rowCountBase )
         throws Exception
     {
         // poke the rowCountBase into the engine. all returned row counts will be
         // increased by this amount
-        sw.getWrappedStatement().execute( "call setRowCountBase( " + rowCountBase + " )"
);
+        setRowCountBase( sw, false, rowCountBase );
 
         largeUpdateTest( sw, rowCountBase, 1L );
         largeUpdateTest( sw, rowCountBase, 3L );
@@ -444,7 +447,7 @@ public class StatementTest
         // poke the rowCountBase into the engine. all returned row counts will be
         // increased by this amount
         sw.getWrappedStatement().clearBatch();
-        sw.getWrappedStatement().execute( "call setRowCountBase( " + rowCountBase + " )"
);
+        setRowCountBase( sw, false, rowCountBase );
 
         long[]  expectedResult = new long[] { rowCountBase + 1L, rowCountBase + 1L, rowCountBase
+ 2L };
 
@@ -463,6 +466,44 @@ public class StatementTest
         sw.getWrappedStatement().addBatch( "update bigintTable set col2 = 2" );
         sw.getWrappedStatement().addBatch( "insert into bigintTable( col2 ) values ( 3 ),
( 4 )" );
     }
+    private static  void    largeMaxRowsTest( StatementWrapper sw, long maxRows )
+        throws Exception
+    {
+        println( "Large max rows test with maxRows = " + maxRows );
+
+        long    expectedRowCount = 3L;
+
+        truncate( sw );
+        sw.getWrappedStatement().execute( "insert into bigintTable( col2 ) values ( 1 ),
( 2 ), ( 3 ), ( 4 ), ( 5 )" );
+        
+        setRowCountBase( sw, usingDerbyNetClient(), maxRows - expectedRowCount );
+
+        sw.setLargeMaxRows( maxRows );
+        
+        ResultSet   rs = sw.getWrappedStatement().executeQuery( "select * from bigintTable"
);
+        int     rowCount = 0;
+        while( rs.next() ) { rowCount++; }
+        rs.close();
+
+        setRowCountBase( sw, usingDerbyNetClient(), 0L );
+        
+        assertEquals( expectedRowCount, rowCount );
+        assertEquals( maxRows, sw.getLargeMaxRows() );
+    }
+        
+    private static  void    setRowCountBase
+        ( StatementTest.StatementWrapper sw, boolean onClient, long rowCountBase )
+        throws Exception
+    {
+        if ( onClient )
+        {
+            org.apache.derby.client.am.Statement.fetchedRowBase = rowCountBase;
+        }
+        else
+        {
+            sw.getWrappedStatement().execute( "call setRowCountBase( " + rowCountBase + "
)" );
+        }
+    }
     private static  void    truncate( StatementTest.StatementWrapper sw )
         throws Exception
     {
@@ -559,6 +600,15 @@ public class StatementTest
                  new Object[] { sql, columnNames }
                  )).longValue();
         }
+        public  long getLargeMaxRows() throws SQLException
+        {
+            return ((Long) invoke
+                (
+                 "getLargeMaxRows",
+                 new Class[] {},
+                 new Object[] {}
+                 )).longValue();
+        }
         public  long getLargeUpdateCount() throws SQLException
         {
             return ((Long) invoke
@@ -568,6 +618,15 @@ public class StatementTest
                  new Object[] {}
                  )).longValue();
         }
+        public  void setLargeMaxRows( long max ) throws SQLException
+        {
+            invoke
+                (
+                 "setLargeMaxRows",
+                 new Class[] { Long.TYPE },
+                 new Object[] { new Long( max ) }
+                 );
+        }
 
 
         // Reflection minion
@@ -594,9 +653,10 @@ public class StatementTest
     //
     ////////////////////////////////////////////////////////////////////////
 
-    /** Set the base which is used for returned row counts */
+    /** Set the base which is used for returned row counts and fetched row counters */
     public  static  void    setRowCountBase( long newBase )
     {
+        EmbedResultSet.fetchedRowBase = newBase;
         RowUtil.rowCountBase = newBase;
     }
 



Mime
View raw message