Skip to content

Conversation

@garudaen
Copy link
Contributor

添加对MySQL不同版本二进制日志查询结果的兼容处理

添加对MySQL不同版本二进制日志查询结果的兼容处理
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds compatibility handling for MySQL binary log query results across different versions by supporting a 4-column result format that includes an encryption algorithm field.

Key changes:

  • Added support for MySQL versions that return 4 columns from SHOW BINARY LOGS (including an encryption algorithm column)
  • Introduced an algorithm variable to capture the encryption algorithm field in newer MySQL versions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +64 to +65
if err := rows.Scan(&filename, &filesize, &encrypted, &algorithm); err != nil {
return
Copy link

Copilot AI Nov 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error from rows.Scan is not logged before returning, which is inconsistent with other error handling in this function (see lines 20, 31, 39). Consider logging the error like: log.Println("E! failed to scan binlog row:", err) to aid debugging when this case is triggered.

Copilot uses AI. Check for mistakes.
@kongfei605
Copy link
Collaborator

Thank you @garudaen

@kongfei605 kongfei605 merged commit 0b95568 into flashcatcloud:main Nov 26, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants