DBZ-82 Changed snapshot query to support pre-5.6.5 versions of MySQL
This commit is contained in:
parent
1c7aabf14f
commit
f0d67143bd
@ -189,9 +189,12 @@ protected void execute() {
|
|||||||
if (rs.next()) {
|
if (rs.next()) {
|
||||||
String binlogFilename = rs.getString(1);
|
String binlogFilename = rs.getString(1);
|
||||||
long binlogPosition = rs.getLong(2);
|
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.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();
|
source.startSnapshot();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user