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(mariadb): bump omni to latest main — full Diagnose add-surface batch (#20644)
Vincent Huang04dcfba2f854
diff --git a/backend/plugin/parser/mariadb/diagnose_e2e_test.go b/backend/plugin/parser/mariadb/diagnose_e2e_test.goindex acd73f0ca3..e013e94856 100644--- a/backend/plugin/parser/mariadb/diagnose_e2e_test.go+++ b/backend/plugin/parser/mariadb/diagnose_e2e_test.go@@ -11,14 +11,26 @@ import ()// mariaDBOnlySQL are statements valid in MariaDB but rejected by the omni/mysql-// parser that backed Engine_MARIADB before this carve-out: SEQUENCE objects,-// NEXT VALUE FOR, and RETURNING on INSERT/REPLACE/DELETE.+// parser that backed Engine_MARIADB before this carve-out. Each omni add-surface+// closed a Diagnose false-flag; this list grows with the bump it ships in.var mariaDBOnlySQL = []string{+ // carve-out baseline + UUID/INET4/INET6 (omni #318)"CREATE SEQUENCE s","INSERT INTO t (id) VALUES (1) RETURNING id","REPLACE INTO t (id) VALUES (1) RETURNING id","DELETE FROM t RETURNING id","SELECT NEXT VALUE FOR s",+ "CREATE TABLE t (a UUID)",+ "CREATE TABLE t (a INET4, b INET6)",+ // system-versioned tables (omni #319)+ "CREATE TABLE t (id INT) WITH SYSTEM VERSIONING",+ "SELECT * FROM t FOR SYSTEM_TIME AS OF NOW()",+ // application-time periods (omni #324-#328)+ "CREATE TABLE t (s DATE, e DATE, PERIOD FOR app_time(s, e))",+ "UPDATE t FOR PORTION OF app_time FROM '2020-01-01' TO '2021-01-01' SET id = 1",+ // parenthesized row constructors (omni #330)+ "SELECT * FROM t WHERE (a, b) IN ((1, 2), (3, 4))",+ "SELECT * FROM t WHERE (a, b) > (1, 2)",}// TestMariaDBDiagnoseKeystone is the carve-out keystone. Before the re-point,@@ -40,6 +52,17 @@ func TestMariaDBDiagnoseKeystone(t *testing.T) {require.Empty(t, mariadbDiags, "omni/mariadb should accept %q with no diagnostic", stmt)}+ // Inverse fidelity case: FOR UPDATE ... OF is valid MySQL but MariaDB removed+ // it in 11.4 (omni #318). The bump makes MariaDB Diagnose correctly flag it,+ // while omni/mysql still accepts it.+ const forUpdateOf = "SELECT a FROM t FOR UPDATE OF t"+ mysqlFU, err := mysql.Diagnose(ctx, base.DiagnoseContext{}, forUpdateOf)+ require.NoError(t, err)+ require.Empty(t, mysqlFU, "omni/mysql accepts FOR UPDATE OF (valid MySQL)")+ mariadbFU, err := Diagnose(ctx, base.DiagnoseContext{}, forUpdateOf)+ require.NoError(t, err)+ require.NotEmpty(t, mariadbFU, "omni/mariadb must flag FOR UPDATE OF (removed in MariaDB 11.4)")+// Diagnose must still report a genuine syntax error — proving it actually// validates, not just "returns empty".badDiags, err := Diagnose(ctx, base.DiagnoseContext{}, "SELECT FROM WHERE )(")diff --git a/go.mod b/go.modindex 53ed46a7fc..b54b8306a8 100644--- a/go.mod+++ b/go.mod@@ -34,7 +34,7 @@ require (github.com/bmatcuk/doublestar/v4 v4.10.0github.com/bytebase/gomongo v0.0.0-20260510192859-8526a440b352github.com/bytebase/lsp-protocol v0.0.0-20250324071136-1586d0c10ff0- github.com/bytebase/omni v0.0.0-20260624035200-8927c2fa8d0b+ github.com/bytebase/omni v0.0.0-20260624184925-84d0fc49432fgithub.com/caarlos0/env/v11 v11.4.1github.com/cenkalti/backoff/v5 v5.0.3github.com/cockroachdb/cockroachdb-parser v0.25.2diff --git a/go.sum b/go.sumindex 67392c9c43..96e35d24d9 100644--- a/go.sum+++ b/go.sum@@ -250,8 +250,8 @@ github.com/bytebase/gomongo v0.0.0-20260510192859-8526a440b352 h1:3sC5pdvJ7bNAhRgithub.com/bytebase/gomongo v0.0.0-20260510192859-8526a440b352/go.mod h1:eyWrxE51HCbjGIChvty/mYaNcAroXshnIiR6SIqlxfY=github.com/bytebase/lsp-protocol v0.0.0-20250324071136-1586d0c10ff0 h1:bJ8NSf2K+pccl5m/wuu97fiYjDwpJH6IzURAq/3XA2U=github.com/bytebase/lsp-protocol v0.0.0-20250324071136-1586d0c10ff0/go.mod h1:BEWMfiZtqshdmulKJcIsWb45MUaEvDO4CROcgi8dfFg=-github.com/bytebase/omni v0.0.0-20260624035200-8927c2fa8d0b h1:f2DHApYswirfEKDKjmc6ie6MBHrBtpKDVad5n6QO+Rc=-github.com/bytebase/omni v0.0.0-20260624035200-8927c2fa8d0b/go.mod h1:Gp5RN3FM07f9/FFOTZCeu8duTAIMeuinkjjBCrs2Dw4=+github.com/bytebase/omni v0.0.0-20260624184925-84d0fc49432f h1:YzyfON4c8NJwddIvQlOtuqqONLjK+vZvLbJcZx4r9vA=+github.com/bytebase/omni v0.0.0-20260624184925-84d0fc49432f/go.mod h1:Gp5RN3FM07f9/FFOTZCeu8duTAIMeuinkjjBCrs2Dw4=github.com/bytebase/parser v0.0.0-20260417075056-57b6ef7a2640 h1:g4Jed1/Jv/DHBiQmEgN5ILOQDDBjFlG4N4Lp+3B4aYE=github.com/bytebase/parser v0.0.0-20260417075056-57b6ef7a2640/go.mod h1:jeak/EfutSOAuWKvrFIT2IZunhWprM7oTFBRgZ9RCxo=github.com/bytebase/pgx/v5 v5.0.0-20250212161523-96ff8aed8767 h1:YuR5G3LcxpO5ScSTA+Kdirxg9RW4TRc/v1t7N2Hfmbw=