private void testBug71396MultiSettingsCheck(String connProps,int maxRows,int limitClause,int expRowCount) throws SQLException {
  Connection testConn=getConnectionWithProps(connProps);
  Statement testStmt=testConn.createStatement();
  if (maxRows > 0) {
    testStmt.setMaxRows(maxRows);
  }
  testStmt.execute("SELECT 1");
  testBug71396StatementCheck(testStmt,String.format("SELECT * FROM testBug71396 LIMIT %d",limitClause),expRowCount);
  testBug71396PrepStatementCheck(testConn,String.format("SELECT * FROM testBug71396 LIMIT %d",limitClause),expRowCount,maxRows);
  testStmt.close();
  testConn.close();
}

private void testBug71396MultiSettingsCheck ( String connProps , int maxRows , int limitClause , int expRowCount ) throws SQLException { Connection testConn = getConnectionWithProps ( connProps ) ; Statement testStmt = testConn . createStatement ( ) ; if ( maxRows > 0 ) { testStmt . setMaxRows ( maxRows ) ; } testStmt . execute ( "SELECT 1" ) ; testBug71396StatementCheck ( testStmt , String . format ( "SELECT * FROM testBug71396 LIMIT %d" , limitClause ) , expRowCount ) ; testBug71396PrepStatementCheck ( testConn , String . format ( "SELECT * FROM testBug71396 LIMIT %d" , limitClause ) , expRowCount , maxRows ) ; testStmt . close ( ) ; testConn . close ( ) ; }
executes a query containing the clause limit with a statement and a preparedstatement , using a combination of connection properties , maxrows value and limit clause value , and tests if the results count is the expected .
