code: func (b *builtinInsertSig) evalString(row chunk.Row) (string, bool, error) {
  	str, isNull, err := b.args[0].EvalString(b.ctx, row)
  	if isNull || err != nil {
  		return "", true, err
  	}
  	runes := []rune(str)
  	runeLength := int64(len(runes))
  
  	pos, isNull, err := b.args[1].EvalInt(b.ctx, row)
  	if isNull || err != nil {
  		return "", true, err
  	}
  	if pos < 1 || pos > runeLength {
  		return str, false, nil
  	}
  
  	length, isNull, err := b.args[2].EvalInt(b.ctx, row)
  	if isNull || err != nil {
  		return "", true, err
  	}
  
  	newstr, isNull, err := b.args[3].EvalString(b.ctx, row)
  	if isNull || err != nil {
  		return "", true, err
  	}
  
  	if length > runeLength-pos+1 || length < 0 {
  		length = runeLength - pos + 1
  	}
  
  	strHead := string(runes[0 : pos-1])
  	strTail := string(runes[pos+length-1:])
  	if uint64(len(strHead)+len(newstr)+len(strTail)) > b.maxAllowedPacket {
  		b.ctx.GetSessionVars().StmtCtx.AppendWarning(errWarnAllowedPacketOverflowed.GenWithStackByArgs("insert", b.maxAllowedPacket))
  		return "", true, nil
  	}
  	return strHead + newstr + strTail, false, nil
  }
docs: // evalString evals INSERT(str,pos,len,newstr).
  // See https://dev.mysql.com/doc/refman/5.6/en/string-functions.html#function_insert