code: func (h *Handle) deleteHistStatsFromKV(physicalID int64, histID int64, isIndex int) (err error) {
  	h.mu.Lock()
  	defer h.mu.Unlock()
  
  	exec := h.mu.ctx.(sqlexec.SQLExecutor)
  	_, err = exec.Execute(context.Background(), "begin")
  	if err != nil {
  		return errors.Trace(err)
  	}
  	defer func() {
  		err = finishTransaction(context.Background(), exec, err)
  	}()
  	txn, err := h.mu.ctx.Txn(true)
  	if err != nil {
  		return errors.Trace(err)
  	}
  	startTS := txn.StartTS()
  	// First of all, we update the version. If this table doesn't exist, it won't have any problem. Because we cannot delete anything.
  	_, err = exec.Execute(context.Background(), fmt.Sprintf("update mysql.stats_meta set version = %d where table_id = %d ", startTS, physicalID))
  	if err != nil {
  		return
  	}
  	// delete histogram meta
  	_, err = exec.Execute(context.Background(), fmt.Sprintf("delete from mysql.stats_histograms where table_id = %d and hist_id = %d and is_index = %d", physicalID, histID, isIndex))
  	if err != nil {
  		return
  	}
  	// delete top n data
  	_, err = exec.Execute(context.Background(), fmt.Sprintf("delete from mysql.stats_top_n where table_id = %d and hist_id = %d and is_index = %d", physicalID, histID, isIndex))
  	if err != nil {
  		return
  	}
  	// delete all buckets
  	_, err = exec.Execute(context.Background(), fmt.Sprintf("delete from mysql.stats_buckets where table_id = %d and hist_id = %d and is_index = %d", physicalID, histID, isIndex))
  	return
  }
docs: // deleteHistStatsFromKV deletes all records about a column or an index and updates version.