Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: throw multi error (#8944)
zll60056d1c160ee10
diff --git a/backend/plugin/advisor/mysqlwip/advisor_stmt_no_select_all.go b/backend/plugin/advisor/mysqlwip/advisor_stmt_no_select_all.goindex 59df4d3149..56bc0b6256 100644--- a/backend/plugin/advisor/mysqlwip/advisor_stmt_no_select_all.go+++ b/backend/plugin/advisor/mysqlwip/advisor_stmt_no_select_all.go@@ -71,8 +71,7 @@ func (checker *noSelectAllChecker) EnterQuery(ctx *mysql.QueryContext) {}func (checker *noSelectAllChecker) EnterSelectItemList(ctx *mysql.SelectItemListContext) {- // we only focus on the first MULT_OPERATOR.- if ctx.MULT_OPERATOR() != nil && len(checker.adviceList) == 0 {+ if ctx.MULT_OPERATOR() != nil {checker.adviceList = append(checker.adviceList, advisor.Advice{Status: checker.level,Code: advisor.StatementSelectAll,diff --git a/backend/plugin/advisor/mysqlwip/test/statement_select_no_select_all.yaml b/backend/plugin/advisor/mysqlwip/test/statement_select_no_select_all.yamlindex 3d7820b2e4..558acacbce 100644--- a/backend/plugin/advisor/mysqlwip/test/statement_select_no_select_all.yaml+++ b/backend/plugin/advisor/mysqlwip/test/statement_select_no_select_all.yaml@@ -17,15 +17,23 @@details: ""- statement: |SELECT a, b FROM t;+ SELECT * FROM t;SELECT a, b FROM (SELECT * from t1 JOIN t2) t;want:- status: WARNcode: 203title: statement.select.no-select-allcontent: |-- "SELECT a, b FROM (SELECT * from t1 JOIN t2) t;" uses SELECT all+ "SELECT * FROM t;" uses SELECT allline: 2details: ""+ - status: WARN+ code: 203+ title: statement.select.no-select-all+ content: |-+ "SELECT a, b FROM (SELECT * from t1 JOIN t2) t;" uses SELECT all+ line: 3+ details: ""- statement: |-SELECT a, b FROM t;SELECT * FROM t1@@ -41,6 +49,15 @@SELECT * FROM t2;" uses SELECT allline: 2details: ""+ - status: WARN+ code: 203+ title: statement.select.no-select-all+ content: |-+ "SELECT * FROM t1+ UNION+ SELECT * FROM t2;" uses SELECT all+ line: 4+ details: ""- statement: |-SELECT a, b FROM t;WITH cte AS (@@ -56,6 +73,15 @@) SELECT * FROM cte;" uses SELECT allline: 3details: ""+ - status: WARN+ code: 203+ title: statement.select.no-select-all+ content: |-+ "WITH cte AS (+ SELECT * FROM a+ ) SELECT * FROM cte;" uses SELECT all+ line: 4+ details: ""- statement: |-SELECT a, b FROM t;SELECT *