Skip to content

Commit

Permalink
Null point Exception during loading the checksum (#1788)
Browse files Browse the repository at this point in the history
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 .
  • Loading branch information
Sweet authored and agapple committed May 11, 2019
1 parent 8f088cd commit 4c690fb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ private void loadBinlogChecksum() {
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;
Expand Down

0 comments on commit 4c690fb

Please sign in to comment.