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: pin arithmetic TTL as a parse error after folding revert
h3n4l746632772359
diff --git a/backend/plugin/parser/mongodb/split_test.go b/backend/plugin/parser/mongodb/split_test.goindex 203b2446e6..48432a7eff 100644--- a/backend/plugin/parser/mongodb/split_test.go+++ b/backend/plugin/parser/mongodb/split_test.go@@ -87,14 +87,15 @@ func TestSplitSQL(t *testing.T) {wantTexts: []string{`db["my-collection"].find({})`},},{- // BYT-9950: constant arithmetic in createIndex options must split- // as a single statement instead of failing to parse.- description: "createIndex with arithmetic TTL expression",+ // BYT-9950: arithmetic expressions are not supported; the parse+ // error must fail the split instead of the statement being+ // silently dropped.+ description: "createIndex with arithmetic TTL expression fails",statement: `db.cs_customer_frequency.createIndex({ trans_date: 1 },{ expireAfterSeconds: 90 * 24 * 60 * 60, name: "cs_customer_frequency_idx2" });`,- wantCount: 1,+ wantError: true,},{// Splitting is strict: an unparseable statement fails the wholediff --git a/go.mod b/go.modindex 1ba50cb23c..84cab3178e 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-20260730021650-cd9ba7a3a4e5+ github.com/bytebase/omni v0.0.0-20260730024920-8e82223f7635github.com/caarlos0/env/v11 v11.4.1github.com/cenkalti/backoff/v7 v7.0.0github.com/cockroachdb/cockroachdb-parser v0.25.2diff --git a/go.sum b/go.sumindex eb6c7c17cd..af61a3fcbb 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-20260730021650-cd9ba7a3a4e5 h1:1vn2vPAkDMjSVsXuqeVcNEwxpDlAVcA2Iw5Sra7egRY=-github.com/bytebase/omni v0.0.0-20260730021650-cd9ba7a3a4e5/go.mod h1:Gp5RN3FM07f9/FFOTZCeu8duTAIMeuinkjjBCrs2Dw4=+github.com/bytebase/omni v0.0.0-20260730024920-8e82223f7635 h1:JBDU5vAImt6qBPy4bUDgWhuuc2NQzR6WTMtKRL51YjE=+github.com/bytebase/omni v0.0.0-20260730024920-8e82223f7635/go.mod h1:Gp5RN3FM07f9/FFOTZCeu8duTAIMeuinkjjBCrs2Dw4=github.com/bytebase/pgx/v5 v5.0.0-20250212161523-96ff8aed8767 h1:YuR5G3LcxpO5ScSTA+Kdirxg9RW4TRc/v1t7N2Hfmbw=github.com/bytebase/pgx/v5 v5.0.0-20250212161523-96ff8aed8767/go.mod h1:ncY89UGWxg82EykZUwSpUKEfccBGGYq1xjrOpsbsfGQ=github.com/bytebase/pkcs8 v0.0.0-20240612095628-fcd0a7484c94 h1:6PNsuNmSqCuR8Z616uQLzDIvujWCFsKzeVc3ECmVubk=