Skip to content

Commit

Permalink
fix: return error 'meet unexepted binlog event type' on binlog end wi…
Browse files Browse the repository at this point in the history
…th ROTATE_EVENT etc.
  • Loading branch information
xiezhenye committed Aug 28, 2015
1 parent f491e67 commit 05abd9c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/binlog_undo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ Result BinlogUndo::scan_begin()
result = read_event_header_at(current_header.log_pos);
ASSERT_BU_OK(result);
}
if (current_header.type_code == ROTATE_EVENT ||
current_header.type_code == STOP_EVENT) {
return BU_EOF;
}
if (current_header.type_code != QUERY_EVENT || current_header.data_written > 100) { // much bigger than begin event(79)
return BU_UNEXCEPTED_EVENT_TYPE;
}
Expand Down

0 comments on commit 05abd9c

Please sign in to comment.