From 684a8f9ea8c7f0e8ad0a548a29898925ba08ca7a Mon Sep 17 00:00:00 2001 From: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Date: Wed, 8 May 2024 10:27:40 +0300 Subject: [PATCH] Adding schema diff test Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --- go/vt/schemadiff/schema_diff_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/go/vt/schemadiff/schema_diff_test.go b/go/vt/schemadiff/schema_diff_test.go index f6477c1885f..b5faf940a0d 100644 --- a/go/vt/schemadiff/schema_diff_test.go +++ b/go/vt/schemadiff/schema_diff_test.go @@ -663,6 +663,16 @@ func TestSchemaDiff(t *testing.T) { expectDeps: 0, entityOrder: []string{"t1"}, }, + { + name: "two identical tables, one with explicit charset, one without", + fromQueries: []string{ + "create table t (id int primary key, foo varchar(64) character set utf8mb3 collate utf8mb3_bin)", + }, + toQueries: []string{ + "create table t (id int primary key, foo varchar(64) collate utf8mb3_bin)", + }, + entityOrder: []string{}, + }, } hints := &DiffHints{RangeRotationStrategy: RangeRotationDistinctStatements} for _, tc := range tt {