From 12ca1e901651644e346cdbb7cbe7fda5af7becf9 Mon Sep 17 00:00:00 2001 From: Daylon Wilkins Date: Thu, 1 Oct 2026 02:19:06 -0700 Subject: [PATCH 1/2] Fixed issue 3105 --- go.mod | 4 ++-- go.sum | 8 ++++---- testing/go/dolt_tables_test.go | 24 ++++++++++++++++++++++-- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 10f96eefd7..7339252c9e 100644 --- a/go.mod +++ b/go.mod @@ -8,10 +8,10 @@ require ( github.com/antchfx/xpath v1.3.3 github.com/cockroachdb/apd/v3 v3.2.3 github.com/cockroachdb/errors v1.7.5 - github.com/dolthub/dolt/go v0.40.5-0.20261002233748-c6af56fead88 + github.com/dolthub/dolt/go v0.40.5-0.20261003025830-2b324410a925 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.20261001232740-19405eb6f203 + github.com/dolthub/go-mysql-server v0.20.1-0.20261003024659-eeb0e3e7bf8e github.com/dolthub/pg_query_go/v6 v6.0.0-20260922094746-ae7577e21dfe github.com/dolthub/sqllogictest/go v0.0.0-20260624223518-788480b24166 github.com/dolthub/vitess v0.0.0-20260930232419-a6b7b0c65d17 diff --git a/go.sum b/go.sum index d899976cab..1ad422a7e0 100644 --- a/go.sum +++ b/go.sum @@ -250,8 +250,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.20261002233748-c6af56fead88 h1:2HfeitrXNFvlCPWog+yMjSeZ4qBWSZOnOaeWI9Ai8QU= -github.com/dolthub/dolt/go v0.40.5-0.20261002233748-c6af56fead88/go.mod h1:+DGXtWsZ7EFxHfh7LFKUEVdfj9aDPhR5SnaLZ7dxWQQ= +github.com/dolthub/dolt/go v0.40.5-0.20261003025830-2b324410a925 h1:Fa6opL5XxPpOf0vt9ssIFf+wh6tMO8+b2EDGWoDOy8E= +github.com/dolthub/dolt/go v0.40.5-0.20261003025830-2b324410a925/go.mod h1:9Si7EBxpVNfxP634VRig0uE436AOfKln4kEJtCxcwfk= 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/file-locks v0.1.1 h1:8oKr20PflAVHkroB5Kq1BrtzesvKop9onekWEse1Qr8= @@ -260,8 +260,8 @@ github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2 h1:u3PMzfF8RkKd3lB9pZ2bfn0qEG+1G github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2/go.mod h1:mIEZOHnFx4ZMQeawhw9rhsj+0zwQj7adVsnBX7t+eKY= 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.20261001232740-19405eb6f203 h1:Q1q3rmpxwHNU3u0uUXM9Zd+VSXtsGiXjU1ohY5z0+pU= -github.com/dolthub/go-mysql-server v0.20.1-0.20261001232740-19405eb6f203/go.mod h1:8yhQsTiaXTn5/q9DCc1RJoOkVvGgDvvVrylW9EFjv/A= +github.com/dolthub/go-mysql-server v0.20.1-0.20261003024659-eeb0e3e7bf8e h1:lUEoKZsrEAZiKoqGPQwBjiaDQXFPEQYhp4bUgkKDwao= +github.com/dolthub/go-mysql-server v0.20.1-0.20261003024659-eeb0e3e7bf8e/go.mod h1:8yhQsTiaXTn5/q9DCc1RJoOkVvGgDvvVrylW9EFjv/A= 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= diff --git a/testing/go/dolt_tables_test.go b/testing/go/dolt_tables_test.go index fc95158732..c4a92888f9 100644 --- a/testing/go/dolt_tables_test.go +++ b/testing/go/dolt_tables_test.go @@ -1549,7 +1549,6 @@ func TestUserSpaceDoltTables(t *testing.T) { }, Assertions: []ScriptTestAssertion{ { - Skip: true, Query: `SELECT to_id FROM dolt_commit_diff_bug6 WHERE to_commit = (SELECT commit_hash FROM dolt.log ORDER BY date DESC LIMIT 1) AND from_commit = (SELECT commit_hash FROM dolt.log ORDER BY date DESC OFFSET 1 LIMIT 1);`, @@ -1558,10 +1557,31 @@ WHERE to_commit = (SELECT commit_hash FROM dolt.log ORDER BY date DESC LIMIT 1) { // workaround: use hashof Query: `SELECT to_id FROM dolt_commit_diff_bug6 -WHERE to_commit = dolt_hashof('HEAD') +WHERE to_commit = dolt_hashof('HEAD') AND from_commit = dolt_hashof('HEAD~');`, Expected: []sql.Row{{1}}, }, + { + Query: `SELECT to_id FROM DOLT_DIFF( + (SELECT commit_hash FROM dolt.log ORDER BY date DESC OFFSET 1 LIMIT 1), + (SELECT commit_hash FROM dolt.log ORDER BY date DESC LIMIT 1), + 'bug6');`, + Expected: []sql.Row{{1}}, + }, + { + Query: `SELECT to_id FROM dolt_commit_diff_bug6 WHERE to_commit = (SELECT commit_hash FROM dolt.log) AND from_commit = dolt_hashof('HEAD~');`, + ExpectedErr: "more than", + ExpectedErrCode: "21000", + }, + { + Query: `SELECT to_id FROM DOLT_DIFF((SELECT commit_hash FROM dolt.log), 'HEAD', 'bug6');`, + ExpectedErr: "more than", + ExpectedErrCode: "21000", + }, + { + Query: `SELECT to_id FROM dolt_commit_diff_bug6 WHERE to_commit = (SELECT commit_hash FROM dolt.log WHERE 1 = 0) AND from_commit = dolt_hashof('HEAD~');`, + Expected: []sql.Row{}, + }, }, }, { From e19cbc873b2a2c870f02519ee58318226f94ce14 Mon Sep 17 00:00:00 2001 From: Zach Musgrave Date: Tue, 24 Nov 2026 23:46:33 +0000 Subject: [PATCH 2/2] Pinned GMS and Dolt, removed DOLT_DIFF subquery argument tests, and updated a plan that now uses a lookup. --- go.mod | 6 +++--- go.sum | 12 ++++++------ testing/go/dolt_tables_test.go | 12 ------------ testing/go/pgcatalog_test.go | 10 +++++----- 4 files changed, 14 insertions(+), 26 deletions(-) diff --git a/go.mod b/go.mod index d857ab8436..303f237920 100644 --- a/go.mod +++ b/go.mod @@ -8,13 +8,13 @@ require ( github.com/antchfx/xpath v1.3.3 github.com/cockroachdb/apd/v3 v3.2.3 github.com/cockroachdb/errors v1.7.5 - github.com/dolthub/dolt/go v0.40.5-0.20261124113844-7bb906c46434 + github.com/dolthub/dolt/go v0.40.5-0.20261124234531-732fbbb4e397 github.com/dolthub/eventsapi_schema v0.0.0-20261119125135-6b30707d614f github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2 - github.com/dolthub/go-mysql-server v0.20.1-0.20261124000141-e42d36114c4f + github.com/dolthub/go-mysql-server v0.20.1-0.20261124234111-5ebdc694cef0 github.com/dolthub/pg_query_go/v6 v6.0.0-20260922094746-ae7577e21dfe github.com/dolthub/sqllogictest/go v0.0.0-20260624223518-788480b24166 - github.com/dolthub/vitess v0.0.0-20261123232303-53d1e53f2f26 + github.com/dolthub/vitess v0.0.0-20261124175554-f1c05d9982e4 github.com/fatih/color v1.13.0 github.com/go-sql-driver/mysql v1.9.3 github.com/goccy/go-json v0.10.2 diff --git a/go.sum b/go.sum index ad94294d7a..1680db2d25 100644 --- a/go.sum +++ b/go.sum @@ -248,8 +248,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.20261124113844-7bb906c46434 h1:aDj5pb9PVNvYmxe4yNWBL0EYYeODgJ8d+eEbzT8sSPo= -github.com/dolthub/dolt/go v0.40.5-0.20261124113844-7bb906c46434/go.mod h1:K7yTxKBeiYkzyLCzbMaGqhqSVsIdZnLMg53xlp50ky8= +github.com/dolthub/dolt/go v0.40.5-0.20261124234531-732fbbb4e397 h1:qE/O59GBWMoC5umHeuFAWLmu0LErya4dCCZajwRDAT4= +github.com/dolthub/dolt/go v0.40.5-0.20261124234531-732fbbb4e397/go.mod h1:IjD9OxaPVuRRoWuOPxQGRqv5V0EuCnI8/AD1INMGieQ= github.com/dolthub/eventsapi_schema v0.0.0-20261119125135-6b30707d614f h1:RrpwiZGxoZBFJFn8JuHHPJtGsugf2yWL2MMlNoTp0AI= github.com/dolthub/eventsapi_schema v0.0.0-20261119125135-6b30707d614f/go.mod h1:SSLraQS/jGLYFgff3vuZ+JbVUct6vyEeMzjLBqWqoyM= github.com/dolthub/file-locks v0.1.2 h1:D0eaII+636hkk7uJu++qaUT/XqDtRTQArWBQ6vEHfJU= @@ -258,8 +258,8 @@ github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2 h1:u3PMzfF8RkKd3lB9pZ2bfn0qEG+1G github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2/go.mod h1:mIEZOHnFx4ZMQeawhw9rhsj+0zwQj7adVsnBX7t+eKY= 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.20261124000141-e42d36114c4f h1:3bvVX3KYrBBoPx82JcM/XE6CKoVRbdfriq6fTepbkAQ= -github.com/dolthub/go-mysql-server v0.20.1-0.20261124000141-e42d36114c4f/go.mod h1:9MXOQ0FwzGSK3gGox5sJqgZCIpOJbBjXeGJENo/9gwo= +github.com/dolthub/go-mysql-server v0.20.1-0.20261124234111-5ebdc694cef0 h1:pMOrOsCz5tDMK23pmEbtEFIuaL6I/xEUTRrHBYYYRQE= +github.com/dolthub/go-mysql-server v0.20.1-0.20261124234111-5ebdc694cef0/go.mod h1:36nawxPUrtAITGtMbkvS/H/4/iHsOJfcxPrljRsL6zQ= 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= @@ -270,8 +270,8 @@ github.com/dolthub/pg_query_go/v6 v6.0.0-20260922094746-ae7577e21dfe h1:5QQHZM+Z github.com/dolthub/pg_query_go/v6 v6.0.0-20260922094746-ae7577e21dfe/go.mod h1:qnrZP3/1slFl2Bq5yw38HLOsArZareGwdpEceriblLc= github.com/dolthub/sqllogictest/go v0.0.0-20260624223518-788480b24166 h1:fdexJBpLDyAGnFbviZYfZ0jhLMnbTWTh39CyQ1EhA28= github.com/dolthub/sqllogictest/go v0.0.0-20260624223518-788480b24166/go.mod h1:e/FIZVvT2IR53HBCAo41NjqgtEnjMJGKca3Y/dAmZaA= -github.com/dolthub/vitess v0.0.0-20261123232303-53d1e53f2f26 h1:s25POv26oktIgWtA+gfCZfYBwZ9K48fiwqoOC9EONv8= -github.com/dolthub/vitess v0.0.0-20261123232303-53d1e53f2f26/go.mod h1:5SVEJgAhw5nnQUFnGgKI1Svqes1Mw+zKUsalyxmOuG0= +github.com/dolthub/vitess v0.0.0-20261124175554-f1c05d9982e4 h1:dLXE0Hg9w+wKnZ4roZVdR3PKiK49mf/OoXOH1YXTDnA= +github.com/dolthub/vitess v0.0.0-20261124175554-f1c05d9982e4/go.mod h1:5SVEJgAhw5nnQUFnGgKI1Svqes1Mw+zKUsalyxmOuG0= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= diff --git a/testing/go/dolt_tables_test.go b/testing/go/dolt_tables_test.go index dbeed3a614..f0a6437bbf 100644 --- a/testing/go/dolt_tables_test.go +++ b/testing/go/dolt_tables_test.go @@ -1616,23 +1616,11 @@ WHERE to_commit = dolt_hashof('HEAD') AND from_commit = dolt_hashof('HEAD~');`, Expected: []sql.Row{{1}}, }, - { - Query: `SELECT to_id FROM DOLT_DIFF( - (SELECT commit_hash FROM dolt.log ORDER BY date DESC OFFSET 1 LIMIT 1), - (SELECT commit_hash FROM dolt.log ORDER BY date DESC LIMIT 1), - 'bug6');`, - Expected: []sql.Row{{1}}, - }, { Query: `SELECT to_id FROM dolt_commit_diff_bug6 WHERE to_commit = (SELECT commit_hash FROM dolt.log) AND from_commit = dolt_hashof('HEAD~');`, ExpectedErr: "more than", ExpectedErrCode: "21000", }, - { - Query: `SELECT to_id FROM DOLT_DIFF((SELECT commit_hash FROM dolt.log), 'HEAD', 'bug6');`, - ExpectedErr: "more than", - ExpectedErrCode: "21000", - }, { Query: `SELECT to_id FROM dolt_commit_diff_bug6 WHERE to_commit = (SELECT commit_hash FROM dolt.log WHERE 1 = 0) AND from_commit = dolt_hashof('HEAD~');`, Expected: []sql.Row{}, diff --git a/testing/go/pgcatalog_test.go b/testing/go/pgcatalog_test.go index dabc5a7a76..a5cf7bff90 100644 --- a/testing/go/pgcatalog_test.go +++ b/testing/go/pgcatalog_test.go @@ -6191,9 +6191,8 @@ ORDER BY 1;`, {"Project"}, {" ├─ columns: [i.indrelid]"}, {" └─ Sort(i.indrelid ASC)"}, - {" └─ Filter"}, - {" ├─ i.indexrelid = Subquery"}, - {" │ ├─ cacheable: true"}, + {" └─ LookupJoin"}, + {" ├─ Max1Row"}, {" │ └─ Project"}, {" │ ├─ columns: [c.oid]"}, {" │ └─ Filter"}, @@ -6203,8 +6202,9 @@ ORDER BY 1;`, {" │ ├─ index: [pg_class.relname,pg_class.relnamespace]"}, {" │ └─ filters: [{[t1_pkey, t1_pkey], [NULL, ∞)}]"}, {" └─ TableAlias(i)"}, - {" └─ Table"}, - {" └─ name: pg_index"}, + {" └─ IndexedTableAccess(pg_index)"}, + {" ├─ index: [pg_index.indexrelid]"}, + {" └─ keys: c.oid"}, }, }, {