DBZ-82 Changed snapshot query to support pre-5.6.5 versions of MySQL

This commit is contained in:
Randall Hauch 2016-06-27 09:23:12 -05:00
parent 1c7aabf14f
commit f0d67143bd

View File

@ -189,9 +189,12 @@ protected void execute() {
if (rs.next()) {
String binlogFilename = rs.getString(1);
long binlogPosition = rs.getLong(2);
String gtidSet = rs.getString(5);// GTID set, may be null, blank, or contain a GTID set
source.setBinlogStartPoint(binlogFilename, binlogPosition);
source.setGtidSet(gtidSet);
if ( rs.getMetaData().getColumnCount() > 4 ) {
// This column exists only in MySQL 5.6.5 or later ...
String gtidSet = rs.getString(5);// GTID set, may be null, blank, or contain a GTID set
source.setGtidSet(gtidSet);
}
source.startSnapshot();
}
});