code: func (b *builtinToBase64Sig) evalString(row chunk.Row) (d string, isNull bool, err error) {
  	str, isNull, err := b.args[0].EvalString(b.ctx, row)
  	if isNull || err != nil {
  		return "", isNull, err
  	}
  	needEncodeLen := base64NeededEncodedLength(len(str))
  	if needEncodeLen == -1 {
  		return "", true, nil
  	}
  	if needEncodeLen > int(b.maxAllowedPacket) {
  		b.ctx.GetSessionVars().StmtCtx.AppendWarning(errWarnAllowedPacketOverflowed.GenWithStackByArgs("to_base64", b.maxAllowedPacket))
  		return "", true, nil
  	}
  	if b.tp.Flen == -1 || b.tp.Flen > mysql.MaxBlobWidth {
  		return "", true, nil
  	}
  
  	//encode
  	strBytes := []byte(str)
  	result := base64.StdEncoding.EncodeToString(strBytes)
  	//A newline is added after each 76 characters of encoded output to divide long output into multiple lines.
  	count := len(result)
  	if count > 76 {
  		resultArr := splitToSubN(result, 76)
  		result = strings.Join(resultArr, "\n")
  	}
  
  	return result, false, nil
  }
docs: // evalString evals a builtinToBase64Sig.
  // See https://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_to-base64