code: func (cc *clientConn) getSessionVarsWaitTimeout(ctx context.Context) uint64 {
  	valStr, exists := cc.ctx.GetSessionVars().GetSystemVar(variable.WaitTimeout)
  	if !exists {
  		return variable.DefWaitTimeout
  	}
  	waitTimeout, err := strconv.ParseUint(valStr, 10, 64)
  	if err != nil {
  		logutil.Logger(ctx).Warn("get sysval wait_timeout error, use default value", zap.Error(err))
  		// if get waitTimeout error, use default value
  		return variable.DefWaitTimeout
  	}
  	return waitTimeout
  }
docs: // getSessionVarsWaitTimeout get session variable wait_timeout