From e975d0e03f5cc14049446606239d8a427e04c986 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Fri, 27 Oct 2023 00:42:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BB=9F=E8=AE=A1=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E6=8E=92=E9=99=A4=E8=87=AA=E5=B8=A6=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/http/controllers/info_controller.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/http/controllers/info_controller.go b/app/http/controllers/info_controller.go index 9bc60965..6885dbc4 100644 --- a/app/http/controllers/info_controller.go +++ b/app/http/controllers/info_controller.go @@ -140,6 +140,9 @@ func (c *InfoController) CountInfo(ctx http.Context) http.Response { if err != nil { continue } + if d.Name == "information_schema" || d.Name == "performance_schema" || d.Name == "mysql" || d.Name == "sys" { + continue + } databases = append(databases, d) } @@ -156,7 +159,7 @@ func (c *InfoController) CountInfo(ctx http.Context) http.Response { databases = databases[3 : len(databases)-1] for _, db := range databases { parts := strings.Split(db, "|") - if len(parts) != 9 || len(strings.TrimSpace(parts[0])) == 0 { + if len(parts) != 9 || len(strings.TrimSpace(parts[0])) == 0 || strings.TrimSpace(parts[0]) == "template0" || strings.TrimSpace(parts[0]) == "template1" || strings.TrimSpace(parts[0]) == "postgres" { continue }