code: func (b *builtinInetAtonSig) evalInt(row chunk.Row) (int64, bool, error) {
  	val, isNull, err := b.args[0].EvalString(b.ctx, row)
  	if err != nil || isNull {
  		return 0, true, err
  	}
  	// ip address should not end with '.'.
  	if len(val) == 0 || val[len(val)-1] == '.' {
  		return 0, true, nil
  	}
  
  	var (
  		byteResult, result uint64
  		dotCount           int
  	)
  	for _, c := range val {
  		if c >= '0' && c <= '9' {
  			digit := uint64(c - '0')
  			byteResult = byteResult*10 + digit
  			if byteResult > 255 {
  				return 0, true, nil
  			}
  		} else if c == '.' {
  			dotCount++
  			if dotCount > 3 {
  				return 0, true, nil
  			}
  			result = (result << 8) + byteResult
  			byteResult = 0
  		} else {
  			return 0, true, nil
  		}
  	}
  	// 127 		-> 0.0.0.127
  	// 127.255 	-> 127.0.0.255
  	// 127.256	-> NULL
  	// 127.2.1	-> 127.2.0.1
  	switch dotCount {
  	case 1:
  		result <<= 8
  		fallthrough
  	case 2:
  		result <<= 8
  	}
  	return int64((result << 8) + byteResult), false, nil
  }
docs: // evalInt evals a builtinInetAtonSig.
  // See https://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html#function_inet-aton