code: func (t *Time) Add(sc *stmtctx.StatementContext, d Duration) (Time, error) {
  	sign, hh, mm, ss, micro := splitDuration(d.Duration)
  	seconds, microseconds, _ := calcTimeDiff(t.Time, FromDate(0, 0, 0, hh, mm, ss, micro), -sign)
  	days := seconds / secondsIn24Hour
  	year, month, day := getDateFromDaynr(uint(days))
  	var tm MysqlTime
  	tm.year, tm.month, tm.day = uint16(year), uint8(month), uint8(day)
  	calcTimeFromSec(&tm, seconds%secondsIn24Hour, microseconds)
  	if t.Type == mysql.TypeDate {
  		tm.hour = 0
  		tm.minute = 0
  		tm.second = 0
  		tm.microsecond = 0
  	}
  	fsp := t.Fsp
  	if d.Fsp > fsp {
  		fsp = d.Fsp
  	}
  	ret := Time{
  		Time: tm,
  		Type: t.Type,
  		Fsp:  fsp,
  	}
  	return ret, ret.Check(sc)
  }
docs: // Add adds d to t, returns the result time value.