summaryrefslogtreecommitdiff
path: root/sql/log_event.h
diff options
context:
space:
mode:
authorLuis Soares <luis.soares@oracle.com>2010-10-06 12:23:46 +0100
committerLuis Soares <luis.soares@oracle.com>2010-10-06 12:23:46 +0100
commitc93eecdf0ad4d0c8fdee057ddb9eca258a29bd88 (patch)
tree69d6ac22ab5a8dca9888f517246883a0711043f2 /sql/log_event.h
parent19a7cf49cc259765cad56c2d82b1db01d49370d7 (diff)
downloadmariadb-git-c93eecdf0ad4d0c8fdee057ddb9eca258a29bd88.tar.gz
BUG#38718: slave sql thread crashes when reading relay log
Suprisingly, a Slave_log_event would show up in the binary log. This event is never used and should not appear in the logs. As such, when the slave (or the mysqlbinlog tool) reads the event, it will hit an invalid pointer (reference to the descriptor event when deserializing the Slave_log_event was purposodely set to NULL). The presence of the Slave_log_event denotes a corrupted log, but we cannot tell how the log got corrupted in the first place. However, we can make the server cope with such events when it reads them - in case of log corruption - and fail gracefully. This patch makes the server/mysqlbinlog to report that it has found an invalid log event when Slave_log_event is read.
Diffstat (limited to 'sql/log_event.h')
-rw-r--r--sql/log_event.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/log_event.h b/sql/log_event.h
index 816a241e55d..662fec23639 100644
--- a/sql/log_event.h
+++ b/sql/log_event.h
@@ -1782,7 +1782,9 @@ public:
void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
#endif
- Slave_log_event(const char* buf, uint event_len);
+ Slave_log_event(const char* buf,
+ uint event_len,
+ const Format_description_log_event *description_event);
~Slave_log_event();
int get_data_size();
bool is_valid() const { return master_host != 0; }