public static void setMaxRows(Statement stmt, int maxRows) {
        if (isMaxRowsSupported()) {
            try {
                stmt.setMaxRows(maxRows);
            }
            catch (Throwable t) {
                // Ignore. Exception may happen if the driver doesn't support
                // this operation and we didn't set meta-data correctly.
                // However, it is a good idea to update the meta-data so that
                // we don't have to incur the cost of catching an exception
                // each time.
                Log.debug("Disabling JDBC method stmt.setMaxRows(maxRows).", t);
                maxRowsSupported = false;
            }
        }
    }
Sets the max number of rows that should be returned from executing a
statement. The operation is automatically bypassed if Jive knows that the
the JDBC driver or database doesn't support it.

@param stmt    the Statement to set the max number of rows for.
@param maxRows the max number of rows to return.
xmppserver/src/main/java/org/jivesoftware/database/DbConnectionManager.java