code: protected void executeQueryPrologue(boolean isBatch) throws SQLException {
      executing = true;
      if (closed) {
        throw new SQLException("execute() is called on closed statement");
      }
      protocol.prolog(maxRows, protocol.getProxy() != null, connection, this);
      if (queryTimeout != 0 && (!canUseServerTimeout || isBatch)) {
        setTimerTask(isBatch);
      }
    }
docs: Command prolog.
  <ol>
  <li>clear previous query state</li>
  <li>launch timeout timer if needed</li>
  </ol>
  
  @param isBatch is batch
  @throws SQLException if statement is closed