mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
Null point Exception during loading the checksum (#1788)
If you connect to the mysql with version 5.1, the result of command 'select @master_binlog_checksum' is an array with only one Null element .
This commit is contained in:
@@ -521,7 +521,7 @@ public class MysqlConnection implements ErosaConnection {
|
||||
try {
|
||||
rs = query("select @@global.binlog_checksum");
|
||||
List<String> columnValues = rs.getFieldValues();
|
||||
if (columnValues != null && columnValues.size() >= 1 && columnValues.get(0).toUpperCase().equals("CRC32")) {
|
||||
if (columnValues != null && columnValues.size() >= 1 && columnValues.get(0) != null && columnValues.get(0).toUpperCase().equals("CRC32")) {
|
||||
binlogChecksum = LogEvent.BINLOG_CHECKSUM_ALG_CRC32;
|
||||
} else {
|
||||
binlogChecksum = LogEvent.BINLOG_CHECKSUM_ALG_OFF;
|
||||
|
||||
Reference in New Issue
Block a user