-
Notifications
You must be signed in to change notification settings - Fork 819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connect failed on GTID mode enabled. #156
Comments
Hi @PhantomThief. binlogFilename "" and null yield different results. The behavior is specified in javadocs. In a nutshell (for simplicity let's assume binlogPosition is 4 (the beginning)):
I'm gonna update the javadocs to make it clear. I understand that there are valid cases when you are not really interested whether gtid_purged is empty or not and so I will also add |
0.11.0 deployed to Maven Central 🎉 |
Thanks a lot. I'll have a test next week:) |
When calling:
binaryLogClient.setGtidSet(""); // enable gtid mode
binaryLogClient.connect();
the following exception.
com.github.shyiko.mysql.binlog.network.ServerException: The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires.
at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:734)
at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:472)
actually I found when I setGtidSet, it wrongly set binlogFilename to "" and after connect it leads a wrong position.
so I have to setBinlogfilename(null) after setGtidSet, it works.
binlog-connector ver is 0.9.2.
The text was updated successfully, but these errors were encountered: