code: func (h *Handle) dumpTableStatCountToKV(id int64, delta variable.TableDelta) (updated bool, err error) {
  	if delta.Count == 0 {
  		return true, nil
  	}
  	h.mu.Lock()
  	defer h.mu.Unlock()
  	ctx := context.TODO()
  	exec := h.mu.ctx.(sqlexec.SQLExecutor)
  	_, err = exec.Execute(ctx, "begin")
  	if err != nil {
  		return false, errors.Trace(err)
  	}
  	defer func() {
  		err = finishTransaction(context.Background(), exec, err)
  	}()
  
  	txn, err := h.mu.ctx.Txn(true)
  	if err != nil {
  		return false, errors.Trace(err)
  	}
  	startTS := txn.StartTS()
  	var sql string
  	if delta.Delta < 0 {
  		sql = fmt.Sprintf("update mysql.stats_meta set version = %d, count = count - %d, modify_count = modify_count + %d where table_id = %d and count >= %d", startTS, -delta.Delta, delta.Count, id, -delta.Delta)
  	} else {
  		sql = fmt.Sprintf("update mysql.stats_meta set version = %d, count = count + %d, modify_count = modify_count + %d where table_id = %d", startTS, delta.Delta, delta.Count, id)
  	}
  	_, err = h.mu.ctx.(sqlexec.SQLExecutor).Execute(ctx, sql)
  	if err != nil {
  		return
  	}
  	updated = h.mu.ctx.GetSessionVars().StmtCtx.AffectedRows() > 0
  	return
  }
docs: // dumpTableStatDeltaToKV dumps a single delta with some table to KV and updates the version.