diff --git a/go.mod b/go.mod index 64daab94f3..3c49bf1061 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/PuerkitoBio/goquery v1.8.1 github.com/cockroachdb/apd/v3 v3.2.3 github.com/cockroachdb/errors v1.7.5 - github.com/dolthub/dolt/go v0.40.5-0.20260805214521-b4b4633e1c40 + github.com/dolthub/dolt/go v0.40.5-0.20260806230109-4f891575ad91 github.com/dolthub/eventsapi_schema v0.0.0-20260715220557-d9b4a1c6b4d4 github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2 github.com/dolthub/go-mysql-server v0.20.1-0.20260806135505-f92b9ff6218c diff --git a/go.sum b/go.sum index 5fcd519dc3..481044d114 100644 --- a/go.sum +++ b/go.sum @@ -246,8 +246,8 @@ github.com/dolthub/aws-sdk-go-ini-parser v0.0.0-20250305001723-2821c37f6c12 h1:I github.com/dolthub/aws-sdk-go-ini-parser v0.0.0-20250305001723-2821c37f6c12/go.mod h1:rN7X8BHwkjPcfMQQ2QTAq/xM3leUSGLfb+1Js7Y6TVo= github.com/dolthub/dolt-mcp v0.3.4 h1:AyG5cw+fNWXDHXujtQnqUPZrpWtPg6FN6yYtjv1pP44= github.com/dolthub/dolt-mcp v0.3.4/go.mod h1:bCZ7KHvDYs+M0e+ySgmGiNvLhcwsN7bbf5YCyillLrk= -github.com/dolthub/dolt/go v0.40.5-0.20260805214521-b4b4633e1c40 h1:zjh+llBUlP0Lt4BZnivmXpWbQP30z9ki3VZOVHOrc/g= -github.com/dolthub/dolt/go v0.40.5-0.20260805214521-b4b4633e1c40/go.mod h1:tu5+NUsslUw+3i+7b57DumjuAegSkbZSpFccQz0u0nk= +github.com/dolthub/dolt/go v0.40.5-0.20260806230109-4f891575ad91 h1:BT7EWnOJ0oSPT0CJjW5N05dAVAQjT7P7/Yw8nEbSz1g= +github.com/dolthub/dolt/go v0.40.5-0.20260806230109-4f891575ad91/go.mod h1:houDkPceGRjDBdaDsfym5OQUB4465mBUnPvSxMOPrPo= github.com/dolthub/eventsapi_schema v0.0.0-20260715220557-d9b4a1c6b4d4 h1:0mg9QEFdkkBwJMxvz1tCjHYmfG2iIC6aShj1InDq9/M= github.com/dolthub/eventsapi_schema v0.0.0-20260715220557-d9b4a1c6b4d4/go.mod h1:SSLraQS/jGLYFgff3vuZ+JbVUct6vyEeMzjLBqWqoyM= github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2 h1:u3PMzfF8RkKd3lB9pZ2bfn0qEG+1Gms9599cr0REMww= diff --git a/testing/go/enginetest/doltgres_engine_test.go b/testing/go/enginetest/doltgres_engine_test.go index 5f8bc10f6a..bd5a192e75 100644 --- a/testing/go/enginetest/doltgres_engine_test.go +++ b/testing/go/enginetest/doltgres_engine_test.go @@ -1678,8 +1678,18 @@ func TestLegacyUpdateScripts(t *testing.T) { } func TestNonlocalTable(t *testing.T) { - t.Skip("port test from Dolt") - h := newDoltgresServerHarness(t) + h := newDoltgresServerHarness(t).WithSkippedQueries([]string{ + // MySQL auto-names unnamed FKs "_ibfk_"; postgres uses "
__fkey". The generated name + // therefore differs from the shared (MySQL-authored) expected value in these ported assertions. + "show create table local_table", + `insert into local_table values ("fdnfjfjf")`, + // TODO: DOLT_VERIFY_CONSTRAINTS('--all') re-verifies constraints via a root merge, and the merge machinery + // doesn't currently carry the "dolt" namespace schema (where dolt_nonlocal_tables lives under Doltgres's + // schema/search-path model) through to the merged root, so FKs referencing a nonlocal table can't be + // resolved there. Regular (non-nonlocal) FKs are unaffected. + "call dolt_verify_constraints", + "select violation_type from dolt_constraint_violations_local_table", + }) denginetest.RunNonlocalTableTests(t, h) } diff --git a/testing/go/enginetest/query_converter_test.go b/testing/go/enginetest/query_converter_test.go index c055a1a13f..7fdae2c1de 100644 --- a/testing/go/enginetest/query_converter_test.go +++ b/testing/go/enginetest/query_converter_test.go @@ -1547,7 +1547,7 @@ func translateRefAction(action sqlparser.ReferenceAction) tree.RefAction { } case sqlparser.DefaultAction: return tree.RefAction{ - Action: tree.Restrict, // is this correct? + Action: tree.NoAction, } default: panic(fmt.Sprintf("unhandled on delete action: %v", action)) @@ -2474,7 +2474,7 @@ func TestAlterTableConversion(t *testing.T) { { input: "ALTER TABLE foo ADD CONSTRAINT my_fk FOREIGN KEY (a) REFERENCES bar(b)", expected: []string{ - "ALTER TABLE foo ADD FOREIGN KEY (a) REFERENCES bar (b) ON DELETE RESTRICT ON UPDATE RESTRICT", + "ALTER TABLE foo ADD FOREIGN KEY (a) REFERENCES bar (b)", }, }, {