forked from facebook/mysql-5.6
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG#20980932 MYSQLBINLOG GENERATES 'ROLLBACK' AFTER FD EVENT CAUSING
1782 ERRRO mysqlbinlog prints "ROLLBACK" at the end of binlog file. The ROLLBACK caused the error that "@@SESSION.GTID_NEXT cannot be set to ANONYMOUS when @@GLOBAL.GTID_MODE = ON." It happened in below cases: - Binlog file doesn't include any data related events. e.g. master-bin.1 only includes: Format_description_log_event Rotate_log_event and mysqlbinlog master-bin.1 master-bin.2 will output: BINLOG '... Format_description_log_event of master-bin.1...' ROLLBACK BINLOG '... Format_description_log_event of master-bin.2...' - Relay log file includes a Format_description_log_event of master which is generated at starting server. e.g. the relay log includes: Format_description_log_event of relay log Format_description_log_event of master(generated when starting server) and mysqlbinlog output: BINLOG '... the binary of relay log's Format_description_log_event' ROLLBACK BINLOG '... the binary of master's Format_description_log_event' When applying a Format_description_log_event, gtid_next's status will be changed to NOT_YET_DETERMINDED_GROUP, so gtid_next will be decided by the following event. If it is an Gtid_log_event, then it will be set to gtid_next, otherwise ANONYMOUS is set. For above two cases, It will set gtid_next to ANONYMOUS when applying ROLLBACK, but gtid_mode is on, so it throws an error. The fix has two parts: - ROLLBACK is not printed out if there is no uncomplete transaction at the end of the binlog. SET @SESSION.GTID_NEXT = 'AUTOMATIC' is always printed at the end of each binlog, even the binlog is empty. It fixes the first case. - Format_description_log_event of relay log is not output as a 'BINLOG'. it fixes the second case.
- Loading branch information
Libing Song
committed
Sep 11, 2015
1 parent
8f1bfe9
commit d048c0f
Showing
37 changed files
with
566 additions
and
358 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.