From dc67841592b0802fb4548fb19fd6c80b7d3332ae Mon Sep 17 00:00:00 2001 From: mornyx Date: Tue, 31 Jan 2023 18:08:18 +0800 Subject: [PATCH] fix linting & bazel Signed-off-by: mornyx --- bindinfo/BUILD.bazel | 1 - sessionctx/variable/session.go | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/bindinfo/BUILD.bazel b/bindinfo/BUILD.bazel index 93b55bfab21c2..94aa2ea990f71 100644 --- a/bindinfo/BUILD.bazel +++ b/bindinfo/BUILD.bazel @@ -34,7 +34,6 @@ go_library( "//util/memory", "//util/parser", "//util/sqlexec", - "//util/stmtsummary", "//util/table-filter", "//util/timeutil", "@org_golang_x_exp//maps", diff --git a/sessionctx/variable/session.go b/sessionctx/variable/session.go index 00cdc4ab4a7ba..547ebba14add0 100644 --- a/sessionctx/variable/session.go +++ b/sessionctx/variable/session.go @@ -3322,7 +3322,7 @@ func (s *stmtSummary) SetEnabled(v bool) { if s.EnablePersistent && s.StmtSummaryV2 != nil { s.StmtSummaryV2.SetEnabled(v) } else if !s.EnablePersistent { - stmtsummary.StmtSummaryByDigestMap.SetEnabled(v) + _ = stmtsummary.StmtSummaryByDigestMap.SetEnabled(v) } } @@ -3332,7 +3332,7 @@ func (s *stmtSummary) SetEnableInternalQuery(v bool) { if s.EnablePersistent && s.StmtSummaryV2 != nil { s.StmtSummaryV2.SetEnableInternalQuery(v) } else if !s.EnablePersistent { - stmtsummary.StmtSummaryByDigestMap.SetEnabledInternalQuery(v) + _ = stmtsummary.StmtSummaryByDigestMap.SetEnabledInternalQuery(v) } } @@ -3342,13 +3342,13 @@ func (s *stmtSummary) SetRefreshInterval(v int64) { if s.EnablePersistent && s.StmtSummaryV2 != nil { s.StmtSummaryV2.SetRefreshInterval(uint32(v)) } else if !s.EnablePersistent { - stmtsummary.StmtSummaryByDigestMap.SetRefreshInterval(v) + _ = stmtsummary.StmtSummaryByDigestMap.SetRefreshInterval(v) } } func (s *stmtSummary) SetHistorySize(v int) { if !s.EnablePersistent { - stmtsummary.StmtSummaryByDigestMap.SetHistorySize(v) + _ = stmtsummary.StmtSummaryByDigestMap.SetHistorySize(v) } } @@ -3358,7 +3358,7 @@ func (s *stmtSummary) SetMaxStmtCount(v int) { if s.EnablePersistent && s.StmtSummaryV2 != nil { s.StmtSummaryV2.SetMaxStmtCount(uint32(v)) } else if !s.EnablePersistent { - stmtsummary.StmtSummaryByDigestMap.SetMaxStmtCount(uint(v)) + _ = stmtsummary.StmtSummaryByDigestMap.SetMaxStmtCount(uint(v)) } } @@ -3368,7 +3368,7 @@ func (s *stmtSummary) SetMaxSQLLength(v int) { if s.EnablePersistent && s.StmtSummaryV2 != nil { s.StmtSummaryV2.SetMaxSQLLength(uint32(v)) } else if !s.EnablePersistent { - stmtsummary.StmtSummaryByDigestMap.SetMaxSQLLength(v) + _ = stmtsummary.StmtSummaryByDigestMap.SetMaxSQLLength(v) } }