code: public void prolog(long maxRows, boolean hasProxy, MariaDbConnection connection,
        MariaDbStatement statement)
        throws SQLException {
      if (explicitClosed) {
        throw new SQLException("execute() is called on closed connection");
      }
      //old failover handling
      if (!hasProxy && shouldReconnectWithoutProxy()) {
        try {
          connectWithoutProxy();
        } catch (SQLException qe) {
          ExceptionMapper.throwException(qe, connection, statement);
        }
      }
  
      try {
        setMaxRows(maxRows);
      } catch (SQLException qe) {
        ExceptionMapper.throwException(qe, connection, statement);
      }
  
      connection.reenableWarnings();
    }
docs: Preparation before command.
  
  @param maxRows    query max rows
  @param hasProxy   has proxy
  @param connection current connection
  @param statement  current statement
  @throws SQLException if any error occur.