docs: @Override
    public void close() throws SQLException {
      lock.lock();
      try {
        closed = true;
        if (results != null) {
          if (results.getFetchSize() != 0) {
            skipMoreResults();
          }
          results.close();
        }
  
        // No possible future use for the cached results, so these can be cleared
        // This makes the cache eligible for garbage collection earlier if the statement is not
        // immediately garbage collected
        if (protocol != null) {
          try {
            serverPrepareResult.getUnProxiedProtocol().releasePrepareStatement(serverPrepareResult);
          } catch (SQLException e) {
            //if (log.isDebugEnabled()) log.debug("Error releasing preparedStatement", e);
          }
        }
  
        protocol = null;
        if (connection == null || connection.pooledConnection == null
            || connection.pooledConnection.noStmtEventListeners()) {
          return;
        }
        connection.pooledConnection.fireStatementClosed(this);
        connection = null;
      } finally {
        lock.unlock();
      }
    }