Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: allow set opr stmt for tidb in sql editor (#14182)
h3n4le42e5f1653ad
diff --git a/backend/plugin/parser/tidb/query.go b/backend/plugin/parser/tidb/query.goindex 84a1f61ff7..ae192d782f 100644--- a/backend/plugin/parser/tidb/query.go+++ b/backend/plugin/parser/tidb/query.go@@ -30,6 +30,7 @@ func validateQuery(statement string) (bool, bool, error) {for _, stmt := range stmtList {switch stmt := stmt.(type) {case *tidbast.SelectStmt:+ case *tidbast.SetOprStmt:case *tidbast.SetStmt:hasExecute = truecase *tidbast.ShowStmt:diff --git a/backend/plugin/parser/tidb/query_test.go b/backend/plugin/parser/tidb/query_test.goindex 5ec2b8f847..8fd1201a3a 100644--- a/backend/plugin/parser/tidb/query_test.go+++ b/backend/plugin/parser/tidb/query_test.go@@ -13,6 +13,11 @@ func TestValidateSQLForEditor(t *testing.T) {gotAllQuery boolerr bool}{+ {+ statement: "SELECT 1 UNION ALL SELECT 2;",+ valid: true,+ gotAllQuery: true,+ },{statement: "SHOW CREATE TABLE bytebase;",valid: true,