code: func (b *builtinSpaceSig) evalString(row chunk.Row) (d string, isNull bool, err error) {
  	var x int64
  
  	x, isNull, err = b.args[0].EvalInt(b.ctx, row)
  	if isNull || err != nil {
  		return d, isNull, err
  	}
  	if x < 0 {
  		x = 0
  	}
  	if uint64(x) > b.maxAllowedPacket {
  		b.ctx.GetSessionVars().StmtCtx.AppendWarning(errWarnAllowedPacketOverflowed.GenWithStackByArgs("space", b.maxAllowedPacket))
  		return d, true, nil
  	}
  	if x > mysql.MaxBlobWidth {
  		return d, true, nil
  	}
  	return strings.Repeat(" ", int(x)), false, nil
  }
docs: // evalString evals a builtinSpaceSig.
  // See https://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_space