From c9cf71ccc04c5fa2c92a77397e5b564ab37e3093 Mon Sep 17 00:00:00 2001 From: Matt Lord Date: Sun, 8 Dec 2024 21:08:54 -0500 Subject: [PATCH] Remove `set names binary` in controller Signed-off-by: Matt Lord --- go/vt/vttablet/tabletmanager/rpc_vreplication_test.go | 2 +- go/vt/vttablet/tabletmanager/vreplication/controller.go | 5 ----- go/vt/vttablet/tabletmanager/vreplication/replicator_plan.go | 1 + 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/go/vt/vttablet/tabletmanager/rpc_vreplication_test.go b/go/vt/vttablet/tabletmanager/rpc_vreplication_test.go index 0a5bd9f26fd..80870de23ce 100644 --- a/go/vt/vttablet/tabletmanager/rpc_vreplication_test.go +++ b/go/vt/vttablet/tabletmanager/rpc_vreplication_test.go @@ -1753,7 +1753,7 @@ func addInvariants(dbClient *binlogplayer.MockDBClient, vreplID, sourceTabletUID fmt.Sprintf("%s||0|0|Stopped|1|%s|0|0", position, workflow), )) dbClient.AddInvariant(setSessionTZ, &sqltypes.Result{}) - dbClient.AddInvariant(setNames, &sqltypes.Result{}) + //dbClient.AddInvariant(setNames, &sqltypes.Result{}) dbClient.AddInvariant(setNetReadTimeout, &sqltypes.Result{}) dbClient.AddInvariant(setNetWriteTimeout, &sqltypes.Result{}) diff --git a/go/vt/vttablet/tabletmanager/vreplication/controller.go b/go/vt/vttablet/tabletmanager/vreplication/controller.go index 7067211ff10..51a37b09284 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/controller.go +++ b/go/vt/vttablet/tabletmanager/vreplication/controller.go @@ -215,11 +215,6 @@ func setDBClientSettings(dbClient binlogplayer.DBClient, workflowConfig *vttable if _, err := dbClient.ExecuteFetch("set @@session.time_zone = '+00:00'", maxRows); err != nil { return err } - // Tables may have varying character sets. To ship the bits without interpreting them - // we set the character set to be binary. - if _, err := dbClient.ExecuteFetch("set names 'binary'", maxRows); err != nil { - return err - } if _, err := dbClient.ExecuteFetch(fmt.Sprintf("set @@session.net_read_timeout = %v", workflowConfig.NetReadTimeout), maxRows); err != nil { return err diff --git a/go/vt/vttablet/tabletmanager/vreplication/replicator_plan.go b/go/vt/vttablet/tabletmanager/vreplication/replicator_plan.go index 1e4524987f2..bb4d4d8548d 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/replicator_plan.go +++ b/go/vt/vttablet/tabletmanager/vreplication/replicator_plan.go @@ -595,6 +595,7 @@ func execParsedQuery(pq *sqlparser.ParsedQuery, bindvars map[string]*querypb.Bin if err != nil { return nil, err } + log.Errorf("DEBUG: vplayer execParsedQuery: query: %s", query) return executor(query) }