From cd7acfbacbd3842ae41c0d80a9706f8fcfc8bbe7 Mon Sep 17 00:00:00 2001 From: James Cor Date: Wed, 10 Jun 2026 12:59:18 -0700 Subject: [PATCH 1/8] test bump --- go/go.mod | 2 +- go/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go/go.mod b/go/go.mod index 77bc4cac70e..20550272e87 100644 --- a/go/go.mod +++ b/go/go.mod @@ -64,7 +64,7 @@ require ( github.com/dolthub/dolt-mcp v0.3.4 github.com/dolthub/eventsapi_schema v0.0.0-20260310172945-37a9265ade69 github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2 - github.com/dolthub/go-mysql-server v0.20.1-0.20260610164400-95a86636de35 + github.com/dolthub/go-mysql-server v0.20.1-0.20260610194023-b023be985ad3 github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63 github.com/edsrzf/mmap-go v1.2.0 github.com/esote/minmaxheap v1.0.0 diff --git a/go/go.sum b/go/go.sum index bbc050ae02f..dade75ad4d3 100644 --- a/go/go.sum +++ b/go/go.sum @@ -214,8 +214,8 @@ github.com/dolthub/fslock v0.0.5 h1:QoXhBhgY1oumHE26qyE7tgmXUT8qjJwxsIzo54O/B/k= github.com/dolthub/fslock v0.0.5/go.mod h1:sdofYYqE0D79zNZyB4/kmlnsQOVap1C2yByjGKSirEM= github.com/dolthub/go-icu-regex v0.0.0-20260610153742-72563bc7ca83 h1:FEMjCGEroDnY/BXyAffVZxUpXhP2GpoUJyyq5KaLn8c= github.com/dolthub/go-icu-regex v0.0.0-20260610153742-72563bc7ca83/go.mod h1:F3cnm+vMRK1HaU6+rNqQrOCyR03HHhR1GWG2gnPOqaE= -github.com/dolthub/go-mysql-server v0.20.1-0.20260610164400-95a86636de35 h1:vwfXXg7kqpmJhBrBc2tbJXQTg1PdlNjztesIdgQhgkk= -github.com/dolthub/go-mysql-server v0.20.1-0.20260610164400-95a86636de35/go.mod h1:xrwqyZnkLeqNm/LNp57NB+otApMXv1UJohn9dSkbgR0= +github.com/dolthub/go-mysql-server v0.20.1-0.20260610194023-b023be985ad3 h1:0rqYZgC8xeJkSuWtRBc64wOfro9ewjzEiQAnKBbnASA= +github.com/dolthub/go-mysql-server v0.20.1-0.20260610194023-b023be985ad3/go.mod h1:A3nEC4RgBm9UzuQCGhQhJDQAiFMPsZU3NPKbGhEd8R4= github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63 h1:OAsXLAPL4du6tfbBgK0xXHZkOlos63RdKYS3Sgw/dfI= github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63/go.mod h1:lV7lUeuDhH5thVGDCKXbatwKy2KW80L4rMT46n+Y2/Q= github.com/dolthub/ishell v0.0.0-20260414231531-5f031e3e9037 h1:oIW9HwuWrhxv+4HZxA+QQSKHLqWFyXZ2FmNjUYwkdiM= From 43e2d49a29f8de95480e359dc55a9e8aa88ec207 Mon Sep 17 00:00:00 2001 From: James Cor Date: Wed, 10 Jun 2026 13:52:40 -0700 Subject: [PATCH 2/8] fix --- go/libraries/doltcore/sqle/index/dolt_index.go | 1 + 1 file changed, 1 insertion(+) diff --git a/go/libraries/doltcore/sqle/index/dolt_index.go b/go/libraries/doltcore/sqle/index/dolt_index.go index a6da33214f0..25380b65237 100644 --- a/go/libraries/doltcore/sqle/index/dolt_index.go +++ b/go/libraries/doltcore/sqle/index/dolt_index.go @@ -637,6 +637,7 @@ func (di *doltIndex) ColumnExpressionTypes(ctx *sql.Context) []sql.ColumnExpress di.colExprTypes[i] = sql.ColumnExpressionType{ Expression: di.tblName + "." + col.Name, Type: col.TypeInfo.ToSqlType(), + Nullable: col.IsNullable(), } } } From 28c32131a745ee0d6a9401ff5e1955548dbef3da Mon Sep 17 00:00:00 2001 From: James Cor Date: Wed, 10 Jun 2026 14:43:06 -0700 Subject: [PATCH 3/8] fix tests --- go/libraries/doltcore/sqle/index/dolt_index.go | 2 ++ integration-tests/bats/sql-commit-diff.bats | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/go/libraries/doltcore/sqle/index/dolt_index.go b/go/libraries/doltcore/sqle/index/dolt_index.go index 25380b65237..767e2e38d37 100644 --- a/go/libraries/doltcore/sqle/index/dolt_index.go +++ b/go/libraries/doltcore/sqle/index/dolt_index.go @@ -154,6 +154,8 @@ func DoltDiffIndexesFromTable(ctx context.Context, db, tbl string, t *doltdb.Tab for i, col := range cols { keyCols[i] = col keyCols[i].Name = toFrom + "_" + col.Name + keyCols[i].IsPartOfPK = false + keyCols[i].Constraints = nil } // to_ columns diff --git a/integration-tests/bats/sql-commit-diff.bats b/integration-tests/bats/sql-commit-diff.bats index f6a34b57712..07e0e758bed 100644 --- a/integration-tests/bats/sql-commit-diff.bats +++ b/integration-tests/bats/sql-commit-diff.bats @@ -64,7 +64,7 @@ teardown() { run dolt sql -q "describe plan select * from dolt_commit_diff_test_two_pk where from_commit = DOLT_HASHOF('create') and to_commit = DOLT_HASHOF('head') and to_pk1 = 2;" [ $status -eq 0 ] [[ "$output" =~ "index: [dolt_commit_diff_test_two_pk.to_commit,dolt_commit_diff_test_two_pk.from_commit,dolt_commit_diff_test_two_pk.to_pk1,dolt_commit_diff_test_two_pk.to_pk2]" ]] || false - [[ "$output" =~ "[2, 2], [NULL, ∞)" ]] || false + [[ "$output" =~ "[2, 2], (NULL, ∞)" ]] || false } @test "sql-commit-diff: DOLT_COMMIT_DIFF with a range on from_ key" { @@ -86,5 +86,5 @@ teardown() { run dolt sql -q "describe plan select * from dolt_commit_diff_test_two_pk where from_commit = DOLT_HASHOF('create') and to_commit = DOLT_HASHOF('head') and from_pk1 = 2;" [ $status -eq 0 ] [[ "$output" =~ "index: [dolt_commit_diff_test_two_pk.to_commit,dolt_commit_diff_test_two_pk.from_commit,dolt_commit_diff_test_two_pk.from_pk1,dolt_commit_diff_test_two_pk.from_pk2]" ]] || false - [[ "$output" =~ "[2, 2], [NULL, ∞)" ]] || false + [[ "$output" =~ "[2, 2], (NULL, ∞)" ]] || false } \ No newline at end of file From cf842a31b25db8fb1840b1019ddb650bcf9862d0 Mon Sep 17 00:00:00 2001 From: James Cor Date: Wed, 10 Jun 2026 15:25:00 -0700 Subject: [PATCH 4/8] bump --- go/go.mod | 2 +- go/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go/go.mod b/go/go.mod index 20550272e87..6b2df42f196 100644 --- a/go/go.mod +++ b/go/go.mod @@ -64,7 +64,7 @@ require ( github.com/dolthub/dolt-mcp v0.3.4 github.com/dolthub/eventsapi_schema v0.0.0-20260310172945-37a9265ade69 github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2 - github.com/dolthub/go-mysql-server v0.20.1-0.20260610194023-b023be985ad3 + github.com/dolthub/go-mysql-server v0.20.1-0.20260610222239-82ca9a426101 github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63 github.com/edsrzf/mmap-go v1.2.0 github.com/esote/minmaxheap v1.0.0 diff --git a/go/go.sum b/go/go.sum index dade75ad4d3..04baf292e5f 100644 --- a/go/go.sum +++ b/go/go.sum @@ -214,8 +214,8 @@ github.com/dolthub/fslock v0.0.5 h1:QoXhBhgY1oumHE26qyE7tgmXUT8qjJwxsIzo54O/B/k= github.com/dolthub/fslock v0.0.5/go.mod h1:sdofYYqE0D79zNZyB4/kmlnsQOVap1C2yByjGKSirEM= github.com/dolthub/go-icu-regex v0.0.0-20260610153742-72563bc7ca83 h1:FEMjCGEroDnY/BXyAffVZxUpXhP2GpoUJyyq5KaLn8c= github.com/dolthub/go-icu-regex v0.0.0-20260610153742-72563bc7ca83/go.mod h1:F3cnm+vMRK1HaU6+rNqQrOCyR03HHhR1GWG2gnPOqaE= -github.com/dolthub/go-mysql-server v0.20.1-0.20260610194023-b023be985ad3 h1:0rqYZgC8xeJkSuWtRBc64wOfro9ewjzEiQAnKBbnASA= -github.com/dolthub/go-mysql-server v0.20.1-0.20260610194023-b023be985ad3/go.mod h1:A3nEC4RgBm9UzuQCGhQhJDQAiFMPsZU3NPKbGhEd8R4= +github.com/dolthub/go-mysql-server v0.20.1-0.20260610222239-82ca9a426101 h1:Abci4YqSTb0jRO7H/BGljkSJ0hkAZvZlim74JLAWros= +github.com/dolthub/go-mysql-server v0.20.1-0.20260610222239-82ca9a426101/go.mod h1:xrwqyZnkLeqNm/LNp57NB+otApMXv1UJohn9dSkbgR0= github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63 h1:OAsXLAPL4du6tfbBgK0xXHZkOlos63RdKYS3Sgw/dfI= github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63/go.mod h1:lV7lUeuDhH5thVGDCKXbatwKy2KW80L4rMT46n+Y2/Q= github.com/dolthub/ishell v0.0.0-20260414231531-5f031e3e9037 h1:oIW9HwuWrhxv+4HZxA+QQSKHLqWFyXZ2FmNjUYwkdiM= From 796ebbd1650fdef3374006602d64b605f8377915 Mon Sep 17 00:00:00 2001 From: James Cor Date: Wed, 10 Jun 2026 16:09:16 -0700 Subject: [PATCH 5/8] more dolt index generation --- go/libraries/doltcore/sqle/index/dolt_index.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/go/libraries/doltcore/sqle/index/dolt_index.go b/go/libraries/doltcore/sqle/index/dolt_index.go index 767e2e38d37..132a00a8cec 100644 --- a/go/libraries/doltcore/sqle/index/dolt_index.go +++ b/go/libraries/doltcore/sqle/index/dolt_index.go @@ -226,6 +226,8 @@ func MakeDiffTableIndex(tableName string, prefix string, sch schema.Schema, incl } for _, col := range sch.GetPKCols().GetColumns() { col.Name = prefix + "_" + col.Name + col.IsPartOfPK = false + col.Constraints = nil cols = append(cols, col) } From d73ca714cb0a09344e6229bc01c626a22339b57b Mon Sep 17 00:00:00 2001 From: James Cor Date: Wed, 10 Jun 2026 16:37:05 -0700 Subject: [PATCH 6/8] fix error messages --- go/libraries/doltcore/sqle/dtables/commit_diff_table.go | 2 +- go/libraries/doltcore/sqle/enginetest/dolt_queries_diff.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go/libraries/doltcore/sqle/dtables/commit_diff_table.go b/go/libraries/doltcore/sqle/dtables/commit_diff_table.go index 8f85966d39f..ebbed1929d9 100644 --- a/go/libraries/doltcore/sqle/dtables/commit_diff_table.go +++ b/go/libraries/doltcore/sqle/dtables/commit_diff_table.go @@ -169,7 +169,7 @@ func (dt *CommitDiffTable) LookupPartitions(ctx *sql.Context, lookup sql.IndexLo switch to.UpperBound.(type) { case sql.Above, sql.Below: default: - return nil, ErrInvalidCommitDiffTableArgs + return nil, ErrExactlyOneToCommit } switch from.UpperBound.(type) { case sql.Above, sql.Below: diff --git a/go/libraries/doltcore/sqle/enginetest/dolt_queries_diff.go b/go/libraries/doltcore/sqle/enginetest/dolt_queries_diff.go index 63076ac5626..441acc0003d 100644 --- a/go/libraries/doltcore/sqle/enginetest/dolt_queries_diff.go +++ b/go/libraries/doltcore/sqle/enginetest/dolt_queries_diff.go @@ -5339,7 +5339,7 @@ var CommitDiffSystemTableScriptTests = []queries.ScriptTest{ }, { Query: "SELECT * FROM DOLT_COMMIT_DIFF_t where from_commit=@Commit1;", - ExpectedErrStr: "error querying table dolt_commit_diff_t: dolt_commit_diff_* tables must be filtered to a single 'to_commit'", + ExpectedErrStr: dtables.ErrExactlyOneToCommit.Error(), }, }, }, From 2de22d2c05da51bf7f3de3dbd2c4fabdba472fd5 Mon Sep 17 00:00:00 2001 From: James Cor Date: Wed, 10 Jun 2026 16:50:33 -0700 Subject: [PATCH 7/8] bats --- integration-tests/bats/sql-commit-diff.bats | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration-tests/bats/sql-commit-diff.bats b/integration-tests/bats/sql-commit-diff.bats index 07e0e758bed..3e81e231e92 100644 --- a/integration-tests/bats/sql-commit-diff.bats +++ b/integration-tests/bats/sql-commit-diff.bats @@ -64,7 +64,7 @@ teardown() { run dolt sql -q "describe plan select * from dolt_commit_diff_test_two_pk where from_commit = DOLT_HASHOF('create') and to_commit = DOLT_HASHOF('head') and to_pk1 = 2;" [ $status -eq 0 ] [[ "$output" =~ "index: [dolt_commit_diff_test_two_pk.to_commit,dolt_commit_diff_test_two_pk.from_commit,dolt_commit_diff_test_two_pk.to_pk1,dolt_commit_diff_test_two_pk.to_pk2]" ]] || false - [[ "$output" =~ "[2, 2], (NULL, ∞)" ]] || false + [[ "$output" =~ "[2, 2], [NULL, ∞)" ]] || false } @test "sql-commit-diff: DOLT_COMMIT_DIFF with a range on from_ key" { @@ -86,5 +86,5 @@ teardown() { run dolt sql -q "describe plan select * from dolt_commit_diff_test_two_pk where from_commit = DOLT_HASHOF('create') and to_commit = DOLT_HASHOF('head') and from_pk1 = 2;" [ $status -eq 0 ] [[ "$output" =~ "index: [dolt_commit_diff_test_two_pk.to_commit,dolt_commit_diff_test_two_pk.from_commit,dolt_commit_diff_test_two_pk.from_pk1,dolt_commit_diff_test_two_pk.from_pk2]" ]] || false - [[ "$output" =~ "[2, 2], (NULL, ∞)" ]] || false + [[ "$output" =~ "[2, 2], NULL, ∞)" ]] || false } \ No newline at end of file From 4310db85370f70daebb379bc769446e7406bdca9 Mon Sep 17 00:00:00 2001 From: James Cor Date: Thu, 11 Jun 2026 13:28:03 -0700 Subject: [PATCH 8/8] goddamit --- integration-tests/bats/sql-commit-diff.bats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/bats/sql-commit-diff.bats b/integration-tests/bats/sql-commit-diff.bats index 3e81e231e92..f6a34b57712 100644 --- a/integration-tests/bats/sql-commit-diff.bats +++ b/integration-tests/bats/sql-commit-diff.bats @@ -86,5 +86,5 @@ teardown() { run dolt sql -q "describe plan select * from dolt_commit_diff_test_two_pk where from_commit = DOLT_HASHOF('create') and to_commit = DOLT_HASHOF('head') and from_pk1 = 2;" [ $status -eq 0 ] [[ "$output" =~ "index: [dolt_commit_diff_test_two_pk.to_commit,dolt_commit_diff_test_two_pk.from_commit,dolt_commit_diff_test_two_pk.from_pk1,dolt_commit_diff_test_two_pk.from_pk2]" ]] || false - [[ "$output" =~ "[2, 2], NULL, ∞)" ]] || false + [[ "$output" =~ "[2, 2], [NULL, ∞)" ]] || false } \ No newline at end of file