code: private boolean executeInternal(String sql, int fetchSize, int autoGeneratedKeys)
        throws SQLException {
  
      lock.lock();
      try {
  
        executeQueryPrologue(false);
        results = new Results(this,
            fetchSize,
            false,
            1,
            false,
            resultSetScrollType,
            resultSetConcurrency,
            autoGeneratedKeys,
            protocol.getAutoIncrementIncrement());
  
        protocol.executeQuery(protocol.isMasterConnection(), results,
            getTimeoutSql(Utils.nativeSql(sql, protocol.noBackslashEscapes())));
        results.commandEnd();
        return results.getResultSet() != null;
  
      } catch (SQLException exception) {
        throw executeExceptionEpilogue(exception);
      } finally {
        executeEpilogue();
        lock.unlock();
      }
  
    }
docs: Executes a query.
  
  @param sql               the query
  @param fetchSize         fetch size
  @param autoGeneratedKeys a flag indicating whether auto-generated keys should be returned; one
  of
  <code>Statement.RETURN_GENERATED_KEYS</code>
  or <code>Statement.NO_GENERATED_KEYS</code>
  @return true if there was a result set, false otherwise.
  @throws SQLException the error description