File tree 1 file changed +7
-1
lines changed
src/main/java/com/github/shyiko/mysql/binlog
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ public class BinaryLogClient implements BinaryLogClientMXBean {
75
75
76
76
private long serverId = 65535 ;
77
77
private volatile String binlogFilename ;
78
- private volatile long binlogPosition ;
78
+ private volatile long binlogPosition = 4 ;
79
79
80
80
private EventDeserializer eventDeserializer = new EventDeserializer ();
81
81
@@ -268,6 +268,12 @@ public void connect() throws IOException {
268
268
if (binlogFilename == null ) {
269
269
fetchBinlogFilenameAndPosition ();
270
270
}
271
+ if (binlogPosition < 4 ) {
272
+ if (logger .isLoggable (Level .WARNING )) {
273
+ logger .warning ("Binary log position adjusted from " + binlogPosition + " to " + 4 );
274
+ }
275
+ binlogPosition = 4 ;
276
+ }
271
277
ChecksumType checksumType = fetchBinlogChecksum ();
272
278
if (checksumType != ChecksumType .NONE ) {
273
279
confirmSupportOfChecksum (checksumType );
You can’t perform that action at this time.
0 commit comments