diff --git a/drivers/mysql/internal/mysql.go b/drivers/mysql/internal/mysql.go index 50140490d..e2c5ada4d 100644 --- a/drivers/mysql/internal/mysql.go +++ b/drivers/mysql/internal/mysql.go @@ -278,7 +278,7 @@ func (m *MySQL) IsCDCSupported(ctx context.Context) (bool, error) { }{ {jdbc.MySQLLogBinQuery(), "ON", "log_bin is not enabled"}, {jdbc.MySQLBinlogFormatQuery(), "ROW", "binlog_format is not set to ROW"}, - {jdbc.MySQLBinlogRowMetadataQuery(), "FULL", "binlog_row_metadata is not set to FULL"}, + {jdbc.MySQLBinlogRowImageQuery(), "FULL", "binlog_row_image is not set to FULL"}, } for _, check := range configChecks { diff --git a/pkg/jdbc/jdbc.go b/pkg/jdbc/jdbc.go index c11bfb93a..3ef23720e 100644 --- a/pkg/jdbc/jdbc.go +++ b/pkg/jdbc/jdbc.go @@ -390,6 +390,11 @@ func MySQLBinlogRowMetadataQuery() string { return "SHOW VARIABLES LIKE 'binlog_row_metadata'" } +// MySQLBinlogRowImageQuery returns the query to fetch the binlog_row_image variable in MySQL +func MySQLBinlogRowImageQuery() string { + return "SHOW VARIABLES LIKE 'binlog_row_image'" +} + // MySQLTableColumnsQuery returns the query to fetch column names of a table in MySQL func MySQLTableColumnsQuery() string { return `