From 028b8b85f543b1baadfe5a12b4743e521c08d7fd Mon Sep 17 00:00:00 2001 From: Matt Lord Date: Tue, 27 Aug 2024 23:06:55 -0400 Subject: [PATCH] Don't ignore table charset and collation Signed-off-by: Matt Lord --- go/vt/sidecardb/schema/vreplication/schema_version.sql | 2 +- go/vt/sidecardb/sidecardb.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/go/vt/sidecardb/schema/vreplication/schema_version.sql b/go/vt/sidecardb/schema/vreplication/schema_version.sql index 2b7cbc08dec..ac28f036eec 100644 --- a/go/vt/sidecardb/schema/vreplication/schema_version.sql +++ b/go/vt/sidecardb/schema/vreplication/schema_version.sql @@ -22,4 +22,4 @@ CREATE TABLE IF NOT EXISTS schema_version ddl BLOB DEFAULT NULL, schemax LONGBLOB NOT NULL, PRIMARY KEY (id) -) ENGINE = InnoDB +) ENGINE = InnoDB, CHARSET utf8mb4 diff --git a/go/vt/sidecardb/sidecardb.go b/go/vt/sidecardb/sidecardb.go index 0947355cd46..c8322af351f 100644 --- a/go/vt/sidecardb/sidecardb.go +++ b/go/vt/sidecardb/sidecardb.go @@ -396,7 +396,6 @@ func (si *schemaInit) getCurrentSchema(tableName string) (string, error) { // or an ALTER if the table exists but has a different schema. func (si *schemaInit) findTableSchemaDiff(tableName, current, desired string) (string, error) { hints := &schemadiff.DiffHints{ - TableCharsetCollateStrategy: schemadiff.TableCharsetCollateIgnoreAlways, AlterTableAlgorithmStrategy: schemadiff.AlterTableAlgorithmStrategyCopy, } env := schemadiff.NewEnv(si.env, si.coll)