code: func (a *recordSet) Next(ctx context.Context, req *chunk.RecordBatch) error {
  	if span := opentracing.SpanFromContext(ctx); span != nil && span.Tracer() != nil {
  		span1 := span.Tracer().StartSpan("recordSet.Next", opentracing.ChildOf(span.Context()))
  		defer span1.Finish()
  	}
  
  	err := a.executor.Next(ctx, req)
  	if err != nil {
  		a.lastErr = err
  		return err
  	}
  	numRows := req.NumRows()
  	if numRows == 0 {
  		if a.stmt != nil {
  			a.stmt.Ctx.GetSessionVars().LastFoundRows = a.stmt.Ctx.GetSessionVars().StmtCtx.FoundRows()
  		}
  		return nil
  	}
  	if a.stmt != nil {
  		a.stmt.Ctx.GetSessionVars().StmtCtx.AddFoundRows(uint64(numRows))
  	}
  	return nil
  }
docs: // Next use uses recordSet's executor to get next available chunk for later usage.
  // If chunk does not contain any rows, then we update last query found rows in session variable as current found rows.
  // The reason we need update is that chunk with 0 rows indicating we already finished current query, we need prepare for
  // next query.
  // If stmt is not nil and chunk with some rows inside, we simply update last query found rows by the number of row in chunk.