code: func CheckGCEnable(ctx sessionctx.Context) (enable bool, err error) {
  	sql := fmt.Sprintf(selectVariableValueSQL, "tikv_gc_enable")
  	rows, _, err := ctx.(sqlexec.RestrictedSQLExecutor).ExecRestrictedSQL(ctx, sql)
  	if err != nil {
  		return false, errors.Trace(err)
  	}
  	if len(rows) != 1 {
  		return false, errors.New("can not get 'tikv_gc_enable'")
  	}
  	return rows[0].GetString(0) == "true", nil
  }
docs: // CheckGCEnable is use to check whether GC is enable.