From 22f59968dc11bf7b5935bdfe3eb776f1d0070391 Mon Sep 17 00:00:00 2001 From: Weizhen Wang Date: Tue, 5 Nov 2024 14:28:25 +0800 Subject: [PATCH] update Signed-off-by: Weizhen Wang --- pkg/planner/core/issuetest/planner_issue_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/planner/core/issuetest/planner_issue_test.go b/pkg/planner/core/issuetest/planner_issue_test.go index 0474e03f975435..9ae6deb4d7350b 100644 --- a/pkg/planner/core/issuetest/planner_issue_test.go +++ b/pkg/planner/core/issuetest/planner_issue_test.go @@ -119,3 +119,11 @@ func TestIssue54535(t *testing.T) { tk.MustQuery("select /*+ inl_join(tmp) */ * from t1 inner join (select col_1, group_concat(col_2) from t2 group by col_1) tmp on t1.col_1 = tmp.col_1;").Check(testkit.Rows()) tk.MustQuery("select /*+ inl_join(tmp) */ * from t1 inner join (select col_1, group_concat(distinct col_2 order by col_2) from t2 group by col_1) tmp on t1.col_1 = tmp.col_1;").Check(testkit.Rows()) } + +func TestIssue(t *testing.T) { + store := testkit.CreateMockStore(t) + tk := testkit.NewTestKit(t, store) + tk.MustExec("use test") + tk.MustExec(`CREATE TABLE t1 (id bigint NOT NULL,c1 varchar(50) NOT NULL ,c2 int DEFAULT NULL ,c3 json DEFAULT NULL ,c4 varchar(255) GENERATED ALWAYS AS (json_unquote(json_extract(c3, '$.oppositePlaceId'))) VIRTUAL ,PRIMARY KEY (id),UNIQUE KEY idx_unique (c1,c2)) ;`) + tk.MustExec("analyze table t1") +}