diff options
author | Kristian Nielsen <knielsen@knielsen-hq.org> | 2016-10-20 18:00:59 +0200 |
---|---|---|
committer | Kristian Nielsen <knielsen@knielsen-hq.org> | 2016-10-20 18:00:59 +0200 |
commit | c06bc668166ed658e6c68a57d9a6ee42b14189e8 (patch) | |
tree | ad9b174e391f7b668a9788cceaa9227467c67b83 /sql/slave.cc | |
parent | e1c502879fea4bc95c493e429c295ba8c95e5483 (diff) | |
download | mariadb-git-c06bc668166ed658e6c68a57d9a6ee42b14189e8.tar.gz |
MDEV-11065: Compressed binary log
Minor review comments/changes:
- A bunch of style-fixes.
- Change macros to static inline functions.
- Update check_event_type() with compressed event types.
- Small .result file update.
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index 62eb24da14c..8f0db28b858 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -6153,8 +6153,10 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len) */ case QUERY_COMPRESSED_EVENT: inc_pos= event_len; - if (query_event_uncompress(rli->relay_log.description_event_for_queue, checksum_alg == BINLOG_CHECKSUM_ALG_CRC32, - buf, new_buf_arr, sizeof(new_buf_arr), &is_malloc, (char **)&new_buf, &event_len)) + if (query_event_uncompress(rli->relay_log.description_event_for_queue, + checksum_alg == BINLOG_CHECKSUM_ALG_CRC32, + buf, new_buf_arr, sizeof(new_buf_arr), + &is_malloc, (char **)&new_buf, &event_len)) { char llbuf[22]; error = ER_BINLOG_UNCOMPRESS_ERROR; @@ -6175,8 +6177,10 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len) case DELETE_ROWS_COMPRESSED_EVENT_V1: inc_pos = event_len; { - if (row_log_event_uncompress(rli->relay_log.description_event_for_queue, checksum_alg == BINLOG_CHECKSUM_ALG_CRC32, - buf, new_buf_arr, sizeof(new_buf_arr), &is_malloc, (char **)&new_buf, &event_len)) + if (row_log_event_uncompress(rli->relay_log.description_event_for_queue, + checksum_alg == BINLOG_CHECKSUM_ALG_CRC32, + buf, new_buf_arr, sizeof(new_buf_arr), + &is_malloc, (char **)&new_buf, &event_len)) { char llbuf[22]; error = ER_BINLOG_UNCOMPRESS_ERROR; @@ -6207,7 +6211,7 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len) DBUG_EXECUTE_IF("kill_slave_io_after_2_events", { if (mi->dbug_do_disconnect && - (LOG_EVENT_IS_QUERY((uchar)buf[EVENT_TYPE_OFFSET]) || + (LOG_EVENT_IS_QUERY((Log_event_type)(uchar)buf[EVENT_TYPE_OFFSET]) || ((uchar)buf[EVENT_TYPE_OFFSET] == TABLE_MAP_EVENT)) && (--mi->dbug_event_counter == 0)) { |