Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

source-mysql: Fix some benign error/warnings that get logged #2058

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion source-mysql/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ func charsetFromCollation(name string) string {
//
// We rely on this assumption to identify known charsets based on the decoders table here.
for charset := range mysqlStringDecoders {
if strings.HasPrefix(name, charset) {
if strings.HasPrefix(name, charset+"_") {
return charset
}
}
Expand Down Expand Up @@ -702,6 +702,8 @@ func decodeBytesToString(charset string, bs []byte) (string, error) {
}

var mysqlStringDecoders = map[string]func([]byte) (string, error){
"utf8": decodeUTF8, // MariaDB alias for utf8mb3 or utf8mb4 depending on config. We don't care, it's all UTF-8 text to us.
"ascii": decodeUTF8, // Guaranteed only ASCII characters (8-bit clean), meaning we can still treat it as UTF-8.
"utf8mb3": decodeUTF8,
"utf8mb4": decodeUTF8,
"latin1": decodeLatin1,
Expand Down
2 changes: 1 addition & 1 deletion source-mysql/replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func (db *mysqlDatabase) ReplicationStream(ctx context.Context, startCursor stri
syncConfig.TLSConfig = nil
syncer = replication.NewBinlogSyncer(syncConfig)
if streamer, err = syncer.StartSync(pos); err == nil {
logrus.Warn("replication connected without TLS")
logrus.Info("replication connected without TLS")
} else {
return nil, fmt.Errorf("error starting binlog sync: %w", err)
}
Expand Down
Loading